This is the demo for DOMPurify, a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, SVG and MathML. The textarea below contains sample-payload - you can also add your own. Watch it sanitize on the console or in the Iframe below. Sanitize textarea value, then write result to console Sanitize textarea value, then write result to DOM Auto convert? Sanitize textarea value, then use $(elm).ht