@@ -361,7 +361,7 @@ metric { | |||
group "body" { | |||
symbol "R_WHITE_ON_WHITE" { | |||
weight = 5.5; | |||
weight = 4.0; | |||
description = "White color on white background in HTML messages"; | |||
} | |||
symbol "HTML_SHORT_LINK_IMG_1" { |
@@ -175,7 +175,7 @@ rspamd_config.R_WHITE_ON_WHITE = { | |||
local arg | |||
for _,p in ipairs(tp) do -- iterate over text parts array using `ipairs` | |||
if p:is_html() then -- if the current part is html part | |||
if p:is_html() and p:get_html() then -- if the current part is html part | |||
normal_len = p:get_length() | |||
local hc = p:get_html() -- we get HTML context | |||
@@ -1545,8 +1545,10 @@ rspamd_html_process_style (rspamd_mempool_t *pool, struct html_block *bl, | |||
rspamd_html_process_color (c, p - c, &bl->font_color); | |||
msg_debug_pool ("got color: %xd", bl->font_color.d.val); | |||
} | |||
if (klen == 16 && g_ascii_strncasecmp (key, | |||
"background-color", 16) == 0) { | |||
else if ((klen == 16 && g_ascii_strncasecmp (key, | |||
"background-color", 16) == 0) || | |||
(klen == 10 && g_ascii_strncasecmp (key, | |||
"background", 10) == 0)) { | |||
rspamd_html_process_color (c, p - c, &bl->background_color); | |||
msg_debug_pool ("got bgcolor: %xd", bl->background_color.d.val); |