From: Alexander Moisseev Date: Sat, 20 Feb 2016 07:45:22 +0000 (+0300) Subject: Don't trigger R_EMPTY_IMAGE on image links X-Git-Tag: 1.2.0~200^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=029d2f4fa1a99728235d5abd87dca885172f2a72;p=rspamd.git Don't trigger R_EMPTY_IMAGE on image links as they covered with `HTML_SHORT_LINK_IMG_1` rule. It should be safe for legitimate emails with images attached since `R_EMPTY_IMAGE` and `HTML_SHORT_LINK_IMG_1` won't be triggered at the same time any more. --- diff --git a/rules/html.lua b/rules/html.lua index 47ff528e8..416ea8c74 100644 --- a/rules/html.lua +++ b/rules/html.lua @@ -97,7 +97,7 @@ rspamd_config.R_EMPTY_IMAGE = { if tag then local parent = tag:get_parent() if parent then - if parent:get_type() == 'a' then + if parent:get_type() ~= 'a' then return true end end