aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lualib/lua_content/pdf.lua4
1 files 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