From: Vsevolod Stakhov Date: Mon, 12 Jul 2021 13:24:03 +0000 (+0100) Subject: [Minor] Some more fixes in state machine X-Git-Tag: 3.0~178 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=39b6052256fda5925af375aa443462aac1be2d6f;p=rspamd.git [Minor] Some more fixes in state machine --- diff --git a/src/libserver/html/html.cxx b/src/libserver/html/html.cxx index 7f31ba650..6407f3e17 100644 --- a/src/libserver/html/html.cxx +++ b/src/libserver/html/html.cxx @@ -1703,10 +1703,10 @@ html_process_input(rspamd_mempool_t *pool, state = content_style; } if (html_document_state == html_document_state::doctype) { - if (cur_tag->id == Tag_HEAD) { + if (cur_tag->id == Tag_HEAD || (cur_tag->flags & CM_HEAD)) { html_document_state = html_document_state::head; } - else { + else if (cur_tag->id != Tag_HTML) { html_document_state = html_document_state::body; } }