add(considered): Sanitizer API is too narrow for a standalone spec page - #208
Merged
Merged
Conversation
`Element.setHTML()` is in the HTML Standard and shipped in Chrome 146 and Firefox 148, but Safari has it in neither desktop nor iOS, so Baseline status is Limited. Recommending it today would mean recommending a method that silently does not exist for a large share of visitors, with DOMPurify as the fallback — which is what sites already do. Filed as too-early, not out-of-scope: unlike CSS subgrid, whether untrusted markup gets sanitised is a user-facing outcome. What is unclear is whether it is an auditable one, and that is the question worth answering when Safari ships. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Deploying specification-website with
|
| Latest commit: |
2983e67
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ba30b9cc.specification-website.pages.dev |
| Branch Preview URL: | https://considered-sanitizer-api-202.specification-website.pages.dev |
This was referenced Sep 11, 2026
jdevalk
marked this pull request as ready for review
September 11, 2026 17:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Records the Sanitizer API as
too-narrowfor a standalone spec page. Preventing HTML injection is a website outcome worth specifying; requiring a particular sanitiser is an implementation choice.The entry acknowledges that
setHTML()already ships in Chrome and Firefox. Safari support is a compatibility constraint requiring feature detection and a suitable fallback, not the reason to defer a spec page.The revisit criterion is a broader page on preventing HTML injection, with outcome-based verification and the Sanitizer API as a possible implementation example. The entry also distinguishes sanitisation from Trusted Types enforcement without treating either as proof that every injection path is protected.
Sources: the WHATWG HTML Standard and MDN documentation, with browser support refreshed through the MDN MCP on 11 September 2026.
Validation: Astro build, ESLint, formatting, Agent Skill integrity and diff checks pass locally. Only the considered entry changes; no spec page or runtime implementation is added.