DOMPurify
A widely used front-end HTML sanitization library that traverses using the browser's native DOM parser and supports sanitization of HTML, SVG, and MathML. It is used to defend against XSS attacks and can be used together with React's dangerouslySetInnerHTML.
Timeline (last 90 days)
The JavaScript library tag counts libraries loaded from a CDN and used by two or more tools, such as marked, Pyodide, DOMPurify, Leaflet, three.js, and others.
The appearance of Pyodide in the tag cloud shows that quite a few tools run Python in the browser; the high-frequency use of Canvas 2D and Clipboard API reflects that these tools lean interactive and practical; the presence of DOMPurify and markdown-it suggests that many tools involve Markdown rendering and HTML sanitization.
The LaTeX renderer uses an <iframe sandbox> mechanism to defend against XSS risks, layered with DOMPurify for HTML sanitization.
DOMPurify is a widely used HTML sanitization library in the frontend ecosystem, maintained by the Cure53 team, supporting sanitization of HTML, SVG, and MathML.
The typical pattern for using DOMPurify in React is to first call DOMPurify.sanitize(html), then pass the result to dangerouslySetInnerHTML.
All Facts (5)
The JavaScript library tag counts libraries loaded from a CDN and used by two or more tools, such as marked, Pyodide, DOMPurify, Leaflet, three.js, and others.
50%UnverifiedThe appearance of Pyodide in the tag cloud shows that quite a few tools run Python in the browser; the high-frequency use of Canvas 2D and Clipboard API reflects that these tools lean interactive and practical; the presence of DOMPurify and markdown-it suggests that many tools involve Markdown rendering and HTML sanitization.
50%UnverifiedThe LaTeX renderer uses an <iframe sandbox> mechanism to defend against XSS risks, layered with DOMPurify for HTML sanitization.
50%UnverifiedDOMPurify is a widely used HTML sanitization library in the frontend ecosystem, maintained by the Cure53 team, supporting sanitization of HTML, SVG, and MathML.
50%UnverifiedThe typical pattern for using DOMPurify in React is to first call DOMPurify.sanitize(html), then pass the result to dangerouslySetInnerHTML.
50%