You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clarification needed: select fragment parsing with <input><option> #196
JustHTML currently matches the html5lib fixture and produces:
| <input>
| <option>
Lexbor/selectolax currently produces:
| <option>
I checked the current WHATWG HTML Living Standard, including the newer customizable select / selectedcontent changes, and it looks like Lexbor’s behavior may be correct for the latest spec.
The relevant current parser rule says that for a start tag whose tag name is input, if the parser was created as part of the HTML fragment parsing algorithm and the context element is a select element, this is a parse error and the token should be ignored:
I would expect the input token to be ignored and the resulting tree to be:
| <option>
That differs from the current html5lib test fixture, which expects:
| <input>
| <option>
Could someone clarify whether this html5lib test is now outdated relative to the current WHATWG spec, or whether there is another rule that still makes the fixture expectation correct?
Activity
annevk commentedon May 7, 2026
#195