commit f9115a8: [Fix] Html: Attach inline tags to the structure
Vsevolod Stakhov
vsevolod at highsecure.ru
Tue Jan 19 17:14:06 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-01-19 17:07:12 +0000
URL: https://github.com/rspamd/rspamd/commit/f9115a80e5e69e43c019c4d667b44c3021578257
[Fix] Html: Attach inline tags to the structure
---
src/libserver/html.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/libserver/html.c b/src/libserver/html.c
index ccc7f310d..d907995ac 100644
--- a/src/libserver/html.c
+++ b/src/libserver/html.c
@@ -939,10 +939,18 @@ rspamd_html_process_tag (rspamd_mempool_t *pool, struct html_content *hc,
/* Inline tag */
parent = (*cur_level)->data;
- if (parent && (parent->flags & (CM_HEAD|CM_UNKNOWN|FL_IGNORE))) {
- tag->flags |= FL_IGNORE;
+ if (parent) {
+ if (hc->total_tags < max_tags) {
+ nnode = g_node_new (tag);
+ g_node_append (*cur_level, nnode);
- return FALSE;
+ hc->total_tags ++;
+ }
+ if ((parent->flags & (CM_HEAD|CM_UNKNOWN|FL_IGNORE))) {
+ tag->flags |= FL_IGNORE;
+
+ return FALSE;
+ }
}
}
More information about the Commits
mailing list