We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// dompurify.js on Node.js 21.6.1 import createDOMPurify from 'dompurify'; // 3.0.8 import { Window } from 'happy-dom'; // 13.3.1 import { JSDOM } from 'jsdom'; // 24.0.0 const input = `<script>"HELLO"</script><body onload="document.write('hello')"><img onload="document.write('hey')"><script>document.write('hello');</script>`; { const window = new Window(); const DOMPurify = createDOMPurify(window); const clean = DOMPurify.sanitize(input); console.log('happy', clean); } { const window = new JSDOM('').window; const DOMPurify = createDOMPurify(window); const clean = DOMPurify.sanitize(input); console.log('jsdom', clean); }
The text was updated successfully, but these errors were encountered:
Related to #1265
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: