]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix HFILTER_URL_ONELINE rule 816/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Fri, 5 Aug 2016 19:17:39 +0000 (22:17 +0300)
committerGitHub <noreply@github.com>
Fri, 5 Aug 2016 19:17:39 +0000 (22:17 +0300)
src/plugins/lua/hfilter.lua

index 88df8f5452deb4a09a031301851708fa1ad5d813..1c359f19ed378ee510bee317ac7e411890ea9e2e 100644 (file)
@@ -267,7 +267,7 @@ local function hfilter(task)
             local rel = url_len / plen
             if rel > 0.8 then
               task:insert_result('HFILTER_URL_ONLY', (rel - 0.8) * 5.0)
-              local lines =  html_text_part:get_lines()
+              local lines =  html_text_part:get_lines_count()
               if lines > 0 and lines < 2 then
                 task:insert_result('HFILTER_URL_ONELINE', 1.00)
               end
@@ -281,7 +281,7 @@ local function hfilter(task)
             local rel = url_len / plen
             if rel > 0.8 then
               task:insert_result('HFILTER_URL_ONLY', (rel - 0.8) * 5.0)
-              local lines =  plain_text_part:get_lines()
+              local lines =  plain_text_part:get_lines_count()
               if lines > 0 and lines < 2 then
                 task:insert_result('HFILTER_URL_ONELINE', 1.00)
               end