aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/html
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-07-11 12:20:41 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-07-11 12:20:41 +0100
commit6e24bc14371ba0e4fa7051a2942d386ad6257ee1 (patch)
tree17e60f17b6087fa5f1d6f86eeaba8c322677801c /src/libserver/html
parent5bd894a34c665bfff8302a8241d545b21ba8c658 (diff)
downloadrspamd-6e24bc14371ba0e4fa7051a2942d386ad6257ee1.tar.gz
rspamd-6e24bc14371ba0e4fa7051a2942d386ad6257ee1.zip
[Minor] Fix states processing
Diffstat (limited to 'src/libserver/html')
-rw-r--r--src/libserver/html/html.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libserver/html/html.cxx b/src/libserver/html/html.cxx
index 1b73e11a6..7f31ba650 100644
--- a/src/libserver/html/html.cxx
+++ b/src/libserver/html/html.cxx
@@ -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))) {