Browse Source

[Fix] Html: Attach inline tags to the structure

tags/3.0
Vsevolod Stakhov 3 years ago
parent
commit
f9115a80e5
1 changed files with 11 additions and 3 deletions
  1. 11
    3
      src/libserver/html.c

+ 11
- 3
src/libserver/html.c View File

@@ -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;
}
}
}


Loading…
Cancel
Save