Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't add selected attribute to <option> if it already exists #215

Conversation

AleksandrHovhannisyan
Copy link
Contributor

Closes #214

@changeset-bot
Copy link

changeset-bot bot commented Apr 7, 2022

🦋 Changeset detected

Latest commit: 411dce3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
preact-render-to-string Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

…dded to <option> elements if it already exists
@AleksandrHovhannisyan AleksandrHovhannisyan force-pushed the fix/duplicate-selected-attribute branch from c326ecd to 411dce3 Compare April 7, 2022 14:51
const VOID_ELEMENTS =
/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;
const VOID_ELEMENTS = /^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Prettier formatted this)

Copy link
Member

@rschristian rschristian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch and thanks for the fix!

@JoviDeCroock JoviDeCroock merged commit a8672db into preactjs:master Apr 8, 2022
@github-actions github-actions bot mentioned this pull request Apr 8, 2022
@AleksandrHovhannisyan AleksandrHovhannisyan deleted the fix/duplicate-selected-attribute branch April 8, 2022 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: <option> elements have a duplicate selected attribute, resulting in HTML validation errors
3 participants