Back to Interop 2027 proposals
Web Sanitizer API
- 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