commit 15701e9: [Fix] Html: Fix the case where only bgcolor is explicitly set
Vsevolod Stakhov
vsevolod at highsecure.ru
Mon Oct 11 14:28:05 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-10-11 15:26:37 +0100
URL: https://github.com/rspamd/rspamd/commit/15701e9dc249bbcd4d5a5a4ada8685d708086e1b (HEAD -> master)
[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;
+ }
}
}
More information about the Commits
mailing list