{ "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": "
  1. x
", "expected": "
  1. x
" }, { "name": "02-paragraphs-with-bold", "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": "
x
safe", "expected": "safe" }, { "name": "12-img-with-onerror-dropped", "input": "", "expected": "" }, { "name": "13-comment-injection-bypass-blocked", "input": "
junk\">x
safe", "expected": "safe" }, { "name": "14-mixed-legit-and-attack", "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": "flashsafe", "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": "

title

section

", "expected": "

title

section

" }, { "name": "26-attribute-value-with-gt-byte", "input": "2\" title=\"a > b\">x", "expected": "x" }, { "name": "27-nested-script-after-text", "input": "lead

para

tail", "expected": "lead

para

tail" }, { "name": "28-empty-input", "input": "", "expected": "" }, { "name": "29-plain-text", "input": "just text, no tags", "expected": "just text, no tags" } ] }