浏览代码

LibWeb: Tokenizing a semicolon-less HTML entity is (just a) parse error

No need to blow chunks over this.
Andreas Kling 5 年之前
父节点
当前提交
851a0f983a
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      Libraries/LibWeb/Parser/HTMLTokenizer.cpp

+ 6 - 1
Libraries/LibWeb/Parser/HTMLTokenizer.cpp

@@ -34,6 +34,11 @@
 
 //#define TOKENIZER_TRACE
 
+#define PARSE_ERROR()                                                                      \
+    do {                                                                                   \
+        dbg() << "Parse error (tokenization)" << __PRETTY_FUNCTION__ << " @ " << __LINE__; \
+    } while (0)
+
 #define CONSUME_NEXT_INPUT_CHARACTER \
     current_input_character = next_codepoint();
 
@@ -1197,7 +1202,7 @@ _StartOfFunction:
                     }
 
                     if (!match.value().entity.ends_with(';')) {
-                        TODO();
+                        PARSE_ERROR();
                     }
 
                     m_temporary_buffer.clear();