Sanitizer config

Pass a SANITIZER_CONFIG and every sink on the page is sanitized with it. Here only a few formatting tags survive; everything else is stripped.

The config (set before fortify.js)

window.DOMFortifyConfig = {
  SANITIZER_CONFIG: { ALLOWED_TAGS: ['b', 'i', 'em', 'strong', 'p', '#text'] },
};

Try it

What landed in the DOM: