From ca33bc789559b264e9292549523e6e45e4d339eb Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 4 Jun 2020 11:59:14 +0200 Subject: [PATCH] LibWeb: Fix tokenization of attributes with empty attributes We were neglecting to emit start tags for tags where the last attribute had no value. Also fix a parse error TODO that I hit while looking at this. --- Libraries/LibWeb/Parser/HTMLTokenizer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Libraries/LibWeb/Parser/HTMLTokenizer.cpp b/Libraries/LibWeb/Parser/HTMLTokenizer.cpp index a8c7cf1e86..4be19cbc13 100644 --- a/Libraries/LibWeb/Parser/HTMLTokenizer.cpp +++ b/Libraries/LibWeb/Parser/HTMLTokenizer.cpp @@ -895,7 +895,7 @@ _StartOfFunction: } ON('>') { - SWITCH_TO(Data); + SWITCH_TO_AND_EMIT_CURRENT_TOKEN(Data); } ON_EOF { @@ -925,7 +925,8 @@ _StartOfFunction: } ON('>') { - TODO(); + PARSE_ERROR(); + SWITCH_TO_AND_EMIT_CURRENT_TOKEN(Data); } ANYTHING_ELSE {