1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-07-02 16:38:37 +00:00

Add new rewrite rule to decode base64 content

This commit is contained in:
nemunaire 2022-05-26 05:44:04 +02:00 committed by GitHub
parent 9fa086e471
commit 5a07fd8932
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 66 additions and 0 deletions

View file

@ -102,6 +102,12 @@ func applyRule(entryURL, entryContent string, rule rule) string {
}
case "add_castopod_episode":
entryContent = addCastopodEpisode(entryURL, entryContent)
case "base64_decode":
if len(rule.args) >= 1 {
entryContent = applyFuncOnTextContent(entryContent, rule.args[0], decodeBase64Content)
} else {
entryContent = applyFuncOnTextContent(entryContent, "body", decodeBase64Content)
}
}
return entryContent