How to use the dompurify.removeHooks 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 shopware / platform / src / Administration / Resources / app / administration / src / core / helper / sanitizer.helper.js View on Github external
static removeMiddleware(middlewareName) {
        if (!middlewareNames.includes(middlewareName)) {
            Shopware.Utils.debug.warn(
                'Sanitizer',
                `No middleware found for name "${middlewareName}", 
                the following are available: ${middlewareNames.join(', ')}`
            );
            return false;
        }

        domPurify.removeHooks(middlewareName);
        return true;
    }
github shopware / platform / src / Administration / Resources / administration / src / core / helper / sanitizer.helper.js View on Github external
static removeMiddleware(middlewareName) {
        if (!middlewareNames.includes(middlewareName)) {
            Shopware.Utils.debug.warn(
                'Sanitizer',
                `No middleware found for name "${middlewareName}", 
                the following are available: ${middlewareNames.join(', ')}`
            );
            return false;
        }

        domPurify.removeHooks(middlewareName);
        return true;
    }

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 13 days ago

Package Health Score

91 / 100
Full package analysis