]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Fix states processing
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 11 Jul 2021 11:20:41 +0000 (12:20 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 11 Jul 2021 11:20:41 +0000 (12:20 +0100)
src/libserver/html/html.cxx

index 1b73e11a6f144288c3bf4d5d53aac6bcb88be2b2..7f31ba650698fa62e94033788b0afc3c9cb85eb6 100644 (file)
@@ -1696,12 +1696,8 @@ html_process_input(rspamd_mempool_t *pool,
 
                case tag_end_opening:
                        content_parser_env.reset();
-
-                       if (cur_tag != nullptr) {
-
-                       }
-
                        state = html_text_content;
+
                        if (cur_tag) {
                                if (cur_tag->id == Tag_STYLE) {
                                        state = content_style;
@@ -1710,6 +1706,9 @@ html_process_input(rspamd_mempool_t *pool,
                                        if (cur_tag->id == Tag_HEAD) {
                                                html_document_state = html_document_state::head;
                                        }
+                                       else {
+                                               html_document_state = html_document_state::body;
+                                       }
                                }
                                else if (html_document_state == html_document_state::head) {
                                        if (!(cur_tag->flags & (CM_EMPTY|CM_HEAD))) {