commit 6e24bc1: [Minor] Fix states processing

Vsevolod Stakhov vsevolod at highsecure.ru
Sun Jul 11 11:28:10 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-07-11 12:20:41 +0100
URL: https://github.com/rspamd/rspamd/commit/6e24bc14371ba0e4fa7051a2942d386ad6257ee1

[Minor] Fix states processing

---
 src/libserver/html/html.cxx | 9 ++++-----
 1 file 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))) {


More information about the Commits mailing list