<script src="https://unpkg.com/sanitize-html@2.14.0/index.js"></script>
<script src="https://unpkg.com/dompurify@3.2.4/dist/purify.js"></script>
const testString = "<b>Welcome to safeland</b><br><a href='javascript:alert(1)'>This is fun</a><br><img src=x onerror=console.log(1)>"
const result = sanitizeHtml("<b>Welcome to safeland</b><br><a href='javascript:alert(1)'>This is fun</a><br><img src=x onerror=console.log(1)>")
const result = DOMPurify.sanitize("<b>Welcome to safeland</b><br><a href='javascript:alert(1)'>This is fun</a><br><img src=x onerror=console.log(1)>")
--enable-precise-memory-info
flag.
Test case name | Result |
---|---|
sanitize | |
purify |
This benchmark does not have any results yet. Be the first one to run it!