소스 검색

[Fix] Fix replacements to sanitize '%' character

tags/1.4.1
Vsevolod Stakhov 7 년 전
부모
커밋
19e9e19dfd
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3
    2
      src/plugins/lua/spamassassin.lua

+ 3
- 2
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

Loading…
취소
저장