]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Lua_content: Use oneline to normalise JS stuff
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 22 Jan 2020 11:01:27 +0000 (11:01 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 22 Jan 2020 11:01:27 +0000 (11:01 +0000)
lualib/lua_content/pdf.lua

index 21f4b64b7022c528d35e0681ec4a5df45a2ca324..53625065a95e9e1f6f44f6d8192ed179ae2893bc 100644 (file)
@@ -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