aboutsummaryrefslogtreecommitdiffstats
path: root/rules
diff options
context:
space:
mode:
Diffstat (limited to 'rules')
-rw-r--r--rules/html.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/rules/html.lua b/rules/html.lua
index 58fabfd7a..6427a325a 100644
--- a/rules/html.lua
+++ b/rules/html.lua
@@ -198,11 +198,11 @@ local vis_check_id = rspamd_config:register_symbol{
hc:foreach_tag({'font', 'span', 'div', 'p', 'td'}, function(tag, clen, is_leaf)
local bl = tag:get_style()
if bl then
- if not bl.visible and is_leaf then
+ if not bl.visible and clen > 0 and is_leaf then
invisible_blocks = invisible_blocks + 1
end
- if (bl.font_size or 12) == 0 and is_leaf then
+ if (bl.font_size or 12) == 0 and clen > 0 and is_leaf then
zero_size_blocks = zero_size_blocks + 1
end