Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cure53/DOMPurify
/ beforeOnLoadSanityCheck
Function
beforeOnLoadSanityCheck
test/bootstrap-test-suite.js:56–61 ·
view source on GitHub ↗
(window)
Source
from the content-addressed store, hash-verified
54
onload
55
) {
56
const
beforeOnLoadSanityCheck =
function
(window) {
57
assert.equal(
58
window.DOMPurify.sanitize(
'<img src=x onerror=alert(1)>'
),
59
'<img src="x">'
60
);
61
};
62
loadDOMPurify(
63
assert,
64
addScriptAttribute,
Callers
nothing calls this directly
Calls
1
sanitize
Method · 0.80
Tested by
no test coverage detected