4 Matching Annotations
  1. Oct 2023
  2. Aug 2022
  3. Jun 2022
    1. DOMPurify - a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG
    1. ```js import DOMPurify from 'dompurify'

      const App = () => { const data = lorem <b onmouseover="alert('mouseover');">ipsum</b> const sanitizedData = () => ({ __html: DOMPurify.sanitize(data) })

      return ( <div dangerouslySetInnerHTML={sanitizedData()} /> ); }

      export default App; ```