commit f3633a9: [Minor] Lua_content: Use oneline to normalise JS stuff
Vsevolod Stakhov
vsevolod at highsecure.ru
Wed Jan 22 12:21:07 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-01-22 11:01:27 +0000
URL: https://github.com/rspamd/rspamd/commit/f3633a995f251bba75faddc25097c92cb4d299af
[Minor] Lua_content: Use oneline to normalise JS stuff
---
lualib/lua_content/pdf.lua | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lualib/lua_content/pdf.lua b/lualib/lua_content/pdf.lua
index 21f4b64b7..53625065a 100644
--- a/lualib/lua_content/pdf.lua
+++ b/lualib/lua_content/pdf.lua
@@ -507,9 +507,9 @@ local process_dict
local function process_javascript(task, pdf, js)
local rspamd_cryptobox_hash = require "rspamd_cryptobox_hash"
if type(js) == 'string' then
- js = rspamd_text.fromstring(js):exclude_chars('%n%c')
+ js = rspamd_text.fromstring(js):oneline()
elseif type(js) == 'userdata' then
- js = js:exclude_chars('%n%c')
+ js = js:oneline()
else
return nil
end
More information about the Commits
mailing list