Sfoglia il codice sorgente

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.
Andreas Kling 5 anni fa
parent
commit
ca33bc7895
1 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  1. 3 2
      Libraries/LibWeb/Parser/HTMLTokenizer.cpp

+ 3 - 2
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
                 {