]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Html: Fix the case where only bgcolor is explicitly set
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 11 Oct 2021 14:26:37 +0000 (15:26 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 11 Oct 2021 14:26:37 +0000 (15:26 +0100)
src/libserver/html/html_block.hxx

index 24a8ad3e5e4d66b72907f50033cdff08cb0a29d2..4a69b73252e280c66faa654e9952cd092e119ad1 100644 (file)
@@ -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;
+                               }
                        }
                }