Skip to content

Conversation

@ggorlen
Copy link
Contributor

@ggorlen ggorlen commented Sep 1, 2022

Resolves #5778

Changes:

  • Use textContent rather than innerHTML to set and compare options in a select menu, avoiding parsing HTML and escaping HTML special characters that might happen to be in the string (see linked issue for details).
  • Add unit test with HTML special characters that fails on the old innerHTML and passes on textContent.

PR Checklist

@limzykenneth limzykenneth merged commit 592e7af into processing:main Sep 30, 2022
@limzykenneth
Copy link
Member

Looks good. Thanks!

@all-contributors please add @ggorlen for code

@allcontributors
Copy link
Contributor

@limzykenneth

I've put up a pull request to add @ggorlen! 🎉

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.

DOM module: HTML special characters break select options

2 participants