diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-01-19 17:07:12 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-01-19 17:11:26 +0000 |
commit | f9115a80e5e69e43c019c4d667b44c3021578257 (patch) | |
tree | 21ddb9a16440251e78e6a0529b26c85d4658b14d /src/libserver/html.c | |
parent | 3b872989f7063e40022883a4aa84d94d75c74995 (diff) | |
download | rspamd-f9115a80e5e69e43c019c4d667b44c3021578257.tar.gz rspamd-f9115a80e5e69e43c019c4d667b44c3021578257.zip |
[Fix] Html: Attach inline tags to the structure
Diffstat (limited to 'src/libserver/html.c')
-rw-r--r-- | src/libserver/html.c | 14 |
1 files 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; + } } } |