diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-01-13 15:18:37 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-01-13 15:18:37 +0000 |
commit | 5f7e2d6ad83aaf1246fa83be2f4a0438323d1abc (patch) | |
tree | 40d5c17a15af0785a9bba03f3e3fa83f0a62e731 /lualib/lua_content | |
parent | 9e39ed68f5f5e6488365bba844238e3e03b33017 (diff) | |
download | rspamd-5f7e2d6ad83aaf1246fa83be2f4a0438323d1abc.tar.gz rspamd-5f7e2d6ad83aaf1246fa83be2f4a0438323d1abc.zip |
[Minor] Ical: Allow \r as line endings
Diffstat (limited to 'lualib/lua_content')
-rw-r--r-- | lualib/lua_content/ical.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lualib/lua_content/ical.lua b/lualib/lua_content/ical.lua index d5a49de2b..5ee37a491 100644 --- a/lualib/lua_content/ical.lua +++ b/lualib/lua_content/ical.lua @@ -23,7 +23,7 @@ local ical_grammar local function gen_grammar() if not ical_grammar then local wsp = l.S(" \t\v\f") - local crlf = l.P"\r"^-1 * l.P"\n" + local crlf = (l.P"\r"^-1 * l.P"\n") + l.P"\r" local eol = (crlf * #crlf) + (crlf - (crlf^-1 * wsp)) local name = l.C((l.P(1) - (l.P":"))^1) / function(v) return (v:gsub("[\n\r]+%s","")) end local value = l.C((l.P(1) - eol)^0) / function(v) return (v:gsub("[\n\r]+%s","")) end |