diff options
Diffstat (limited to 'src/plugins/lua/spamassassin.lua')
-rw-r--r-- | src/plugins/lua/spamassassin.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/lua/spamassassin.lua b/src/plugins/lua/spamassassin.lua index c2b3dd1d2..c71fe12eb 100644 --- a/src/plugins/lua/spamassassin.lua +++ b/src/plugins/lua/spamassassin.lua @@ -1101,8 +1101,9 @@ local function apply_replacements(str) local sstr sstr = s fun.each(function(n, t) - sstr = string.gsub(sstr, string.format("<%s>", n), - string.format("%s%s%s", pre, t, post)) + local rep = string.format("%s%s%s", pre, t, post) + rep = string.gsub(rep, '%%', '%%%%') + sstr = string.gsub(sstr, string.format("<%s>", n), rep) end, replace['tags']) return sstr |