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 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 (3)
The 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%