How to use the dompurify.isValidAttribute function in dompurify

To help you get started, we’ve selected a few dompurify examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ampproject / worker-dom / src / main-thread / DOMPurifySanitizer.ts View on Github external
validAttribute(tag: string, attr: string, value: string): boolean {
    return purify.isValidAttribute(tag, attr, value);
  }

dompurify

DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. It's written in JavaScript and works in all modern browsers (Safari, Opera (15+), Internet Explorer (10+), Firefox and Chrome - as well as almost anything else usin

(MPL-2.0 OR Apache-2.0)
Latest version published 1 day ago

Package Health Score

91 / 100
Full package analysis