]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Some more fixes in state machine
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 12 Jul 2021 13:24:03 +0000 (14:24 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 12 Jul 2021 13:54:39 +0000 (14:54 +0100)
src/libserver/html/html.cxx

index 7f31ba650698fa62e94033788b0afc3c9cb85eb6..6407f3e175b163a6d36dfc90f2c957c399d5308b 100644 (file)
@@ -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;
                                        }
                                }