commit 569b546: [Minor] Fix style propagation

Vsevolod Stakhov vsevolod at highsecure.ru
Fri Jul 16 09:56:04 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-07-16 10:49:09 +0100
URL: https://github.com/rspamd/rspamd/commit/569b546d5bcee995286229144f9d1a5b84f0948a (HEAD -> master)

[Minor] Fix style propagation

---
 src/libserver/html/html_block.hxx | 1 +
 src/libserver/html/html_tests.cxx | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/src/libserver/html/html_block.hxx b/src/libserver/html/html_block.hxx
index 8416bbc5a..01b5b17b9 100644
--- a/src/libserver/html/html_block.hxx
+++ b/src/libserver/html/html_block.hxx
@@ -157,6 +157,7 @@ struct html_block {
 				/* We propagate parent if defined */
 				if (other.mask & mask_val) {
 					our_val = other_val;
+					mask |= mask_val;
 				}
 				/* Otherwise do nothing */
 			}
diff --git a/src/libserver/html/html_tests.cxx b/src/libserver/html/html_tests.cxx
index 73f2ad81b..e98ab61c2 100644
--- a/src/libserver/html/html_tests.cxx
+++ b/src/libserver/html/html_tests.cxx
@@ -164,6 +164,9 @@ TEST_CASE("html text extraction")
 			 " </p>",
 					" Sincerely,\n Skype Web\n"},
 			{"lala<p hidden>fafa</p>", "lala"},
+			{"<table style=\"FONT-SIZE: 0px;\"><tbody><tr><td>\n"
+			 "DONKEY\n"
+			 "</td></tr></tbody></table>", ""},
 			/* bgcolor propagation */
 			{"<a style=\"display: inline-block; color: #ffffff; background-color: #00aff0;\">\n"
 			 "<span style=\"color: #00aff0;\">F</span>Rev<span style=\"opacity: 1;\"></span></span>ie<span style=\"opacity: 1;\"></span>"


More information about the Commits mailing list