Back to Interop 2027 proposals

Web Sanitizer API

Proposed by web-platform-tests/interop#1336
Participate in this proposal on GitHub

Direct 1-click actions are temporarily unavailable for Interop proposals pending repository app approval. Cast your vote by adding a +1 reaction or join the discussion directly on GitHub.

Open issue on GitHub
  • The setHTML() method inserts HTML into the DOM in a way that prevents cross-site scripting attacks.
  • The parseHTML() method of the Document object provides an XSS-safe method to parse and sanitize a string of HTML in order to create a new Document.

I will limit the scope to setHTML() and Document.parseHTML() (unless it is feasible to also include the newer methods - replaceWithHTML, appendHTML, prependHTML, beforeHTML, afterHTML - which have landed in Chrome 154)

Discussion on GitHub (0)

No comments on GitHub yet

Be the first developer to share technical feedback or use cases on this Interop proposal.

Join discussion on GitHub