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: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F532%2Fhead;p=thirdparty%2Frspamd.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 47ff528e83..416ea8c74b 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