From: Vsevolod Stakhov Date: Tue, 19 Jan 2021 17:07:12 +0000 (+0000) Subject: [Fix] Html: Attach inline tags to the structure X-Git-Tag: 3.0~759 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f9115a80e5e69e43c019c4d667b44c3021578257;p=thirdparty%2Frspamd.git [Fix] Html: Attach inline tags to the structure --- diff --git a/src/libserver/html.c b/src/libserver/html.c index ccc7f310d0..d907995acb 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; + } } }