Skip to content

Remove fragment parsing special case for input tags#12420

Closed
josepharhar wants to merge 1 commit into
whatwg:mainfrom
josepharhar:innerhtmlinput
Closed

Remove fragment parsing special case for input tags#12420
josepharhar wants to merge 1 commit into
whatwg:mainfrom
josepharhar:innerhtmlinput

Conversation

@josepharhar
Copy link
Copy Markdown
Contributor

@josepharhar josepharhar commented May 5, 2026

A special case was added for fragment parsing <select> when assigning innerHTML of another select element due to a regression bug, which I documented here: #10310 (comment)

However, this special case was copied over to input tags as well, which was recently noticed here but was never implemented in chromium or html5lib-tests: html5lib/html5lib-tests#195

This PR removes this special case to match implementations and tests. Allowing input tags inside select is also something that I'm looking into supporting separately, and this case has been supported in stable chromium for long enough that I don't think it is breaking any websites.

(See WHATWG Working Mode: Changes for more details.)


/parsing.html ( diff )

A special case was added for fragment parsing `<select>` when assigning
innerHTML of another select element due to a regression bug, which I
documented here: whatwg#10310 (comment)

However, this special case was copied over to input tags as well, which
was recently noticed here but was never implemented in chromium or
html5lib-tests: html5lib/html5lib-tests#195

This PR removes this special case to match implementations and tests.
Allowing input tags inside select is also something that I'm looking
into supporting separately, and this case has been supported in stable
chromium for long enough that I don't think it is breaking any websites.
@josepharhar
Copy link
Copy Markdown
Contributor Author

After doing more digging, I found the reason why this was added: #10557 (comment)

I just never implmented it. I guess that if we change how input tags are parsed inside select, we could just make the innerHTML case match the regular parsing case.

@josepharhar josepharhar closed this May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant