commit b5cdc5c: [Minor] Do not append style and title tags in invisible content

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Oct 11 14:28:04 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-10-11 15:20:21 +0100
URL: https://github.com/rspamd/rspamd/commit/b5cdc5c6b35898a36f04245ceb882c52d8f58e3e

[Minor] Do not append style and title tags in invisible content

---
 src/libserver/html/html.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libserver/html/html.cxx b/src/libserver/html/html.cxx
index 1e5d52241..cfd7876b6 100644
--- a/src/libserver/html/html.cxx
+++ b/src/libserver/html/html.cxx
@@ -1162,7 +1162,7 @@ html_append_tag_content(rspamd_mempool_t *pool,
 
 		return ret;
 	}
-	else if (tag->id == Tag_HEAD && (tag->flags & FL_IGNORE)) {
+	else if (tag->id == Tag_HEAD || (tag->flags & CM_HEAD)) {
 		auto ret = tag->closing.end;
 		calculate_final_tag_offsets();
 


More information about the Commits mailing list