-
Notifications
You must be signed in to change notification settings - Fork 22.9k
setHTML and friends - fixes for data-attributes. #41715
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
Conversation
|
Preview URLs
(comment last updated: 2025-10-28 07:18:08) |
That's ironic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t feel strongly about data- attribute vs data-attribute, so feel free to not commit the suggestions. But to me at least, “data-attribute” seemed odd (I don’t recall having seen it in existing content) — at least, ambiguous and potentially confusing to readers. So data- attribute seems less ambiguous and less potentially confusing.
Co-authored-by: sideshowbarker <mike@w3.org>
Co-authored-by: sideshowbarker <mike@w3.org>
|
Thanks @sideshowbarker . I think you're right. Accepted your changes, though in a couple of places made minor changes so that it wouldn't break the code. |
This follows #41695 with even more tweaks to the setHTML methods. Specifically it makes clear that data-attributes are not removed by in all cases (though they are by the default sanitizer). It adds embed to the list of elements that can be removed.
In addition, this tidies the examples a bit, which were broken by a recently added script end tag.