From 15701e9dc249bbcd4d5a5a4ada8685d708086e1b Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 11 Oct 2021 15:26:37 +0100 Subject: [PATCH] [Fix] Html: Fix the case where only bgcolor is explicitly set --- src/libserver/html/html_block.hxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libserver/html/html_block.hxx b/src/libserver/html/html_block.hxx index 24a8ad3e5..4a69b7325 100644 --- a/src/libserver/html/html_block.hxx +++ b/src/libserver/html/html_block.hxx @@ -267,9 +267,11 @@ struct html_block { } } else if (bg_color_mask) { - if (is_similar_colors(rspamd::css::css_color::black(), bg_color)) { - visibility_mask = html_block::transparent_flag; - return; + if (bg_color.alpha > 10) { + if (is_similar_colors(rspamd::css::css_color::black(), bg_color)) { + visibility_mask = html_block::transparent_flag; + return; + } } } -- 2.39.5