{ "allowlist": "{\"p\":[],\"br\":[],\"strong\":[],\"em\":[],\"u\":[],\"s\":[],\"code\":[],\"pre\":[],\"ul\":[],\"ol\":[],\"li\":[],\"h1\":[],\"h2\":[],\"h3\":[],\"h4\":[],\"blockquote\":[],\"a\":[\"href\",\"title\"]}", "cases": [ { "name": "01-pass-through-list", "input": "
hello world
second
", "expected": "hello world
second
" }, { "name": "03-pre-code-block", "input": "npm install",
"expected": "npm install"
},
{
"name": "04-allowed-https-link",
"input": "click",
"expected": "click"
},
{
"name": "05-allowed-anchor-link",
"input": "jump",
"expected": "jump"
},
{
"name": "06-javascript-scheme-blocked",
"input": "click",
"expected": "click"
},
{
"name": "07-about-scheme-blocked",
"input": "click",
"expected": "click"
},
{
"name": "08-data-uri-blocked",
"input": "alert(1)\">x",
"expected": "x"
},
{
"name": "09-script-content-dropped",
"input": "beforeafter",
"expected": "beforeafter"
},
{
"name": "10-iframe-content-dropped",
"input": "safe",
"expected": "safe"
},
{
"name": "11-form-content-dropped",
"input": "safe",
"expected": "safe"
},
{
"name": "12-img-with-onerror-dropped",
"input": "hello
world
", "expected": "hello
world
" }, { "name": "15-pre-encoded-entities-preserved", "input": "<script>alert(1)</script>", "expected": "<script>alert(1)</script>" }, { "name": "16-unicode-in-href-preserved", "input": "x", "expected": "x" }, { "name": "17-unclosed-tag-passes-through", "input": "unclosed", "expected": "
unclosed" }, { "name": "18-onclick-attribute-stripped-tag-survives", "input": "
hi
", "expected": "hi
" }, { "name": "19-tab-bypass-in-scheme-blocked", "input": "x", "expected": "x" }, { "name": "20-uppercase-tag-and-attr-normalised", "input": "x", "expected": "x" }, { "name": "21-style-content-dropped", "input": "visible", "expected": "visible" }, { "name": "22-object-content-dropped", "input": "safe", "expected": "safe" }, { "name": "23-svg-onload-dropped", "input": "safe", "expected": "safe" }, { "name": "24-blockquote-passthrough", "input": "quoted text", "expected": "
quoted text" }, { "name": "25-headings-passthrough", "input": "
para
tail", "expected": "leadpara
tail" }, { "name": "28-empty-input", "input": "", "expected": "" }, { "name": "29-plain-text", "input": "just text, no tags", "expected": "just text, no tags" } ] }