html5-php
html5-php copied to clipboard
Continue parsing as data after invalid opening tag
Per section 8.2.4.1 of spec version 20141028:
Parse error. Switch to the data state. Emit a U+003C LESS-THAN SIGN character token. Reconsume the current input character.
Note: the 20141028 version of the spec was used because the section numbering matches up with existing references in code. The relevant section for the living HTML5 spec is 13.2.5.1 and provides similar guidance.
fixes #250
up please 🙏
Note: the 20141028 version of the spec was used because the section numbering matches up with existing references in code. The relevant section for the living HTML5 spec is 13.2.5.1 and provides similar guidance.
I think it's 13.2.5.6 Tag open state, isn't it?
Anything else: This is an invalid-first-character-of-tag-name parse error. Emit a U+003C LESS-THAN SIGN character token. Reconsume in the data state.
The consequences are the same (adding <), which seems to be fine.
Note: the 20141028 version of the spec was used because the section numbering matches up with existing references in code. The relevant section for the living HTML5 spec is 13.2.5.1 and provides similar guidance.
I think it's 13.2.5.6 Tag open state, isn't it?
Anything else: This is an invalid-first-character-of-tag-name parse error. Emit a U+003C LESS-THAN SIGN character token. Reconsume in the data state.
The consequences are the same (adding
<), which seems to be fine.
I was attempting to address issues consuming the < while in data state. As noted in my other comment, there are indeed still issues to resolve with tag name and attribute name states.