sanitize(dirty, {SANITIZE_DOM: false}); // keep an element's content when the element is removed (default is true) var clean = DOMPurify.sanitize(dirty, {KEEP_CONTENT: false}); // glue elements like style, script or others to document.body and prevent unintuitive browser behavior in ...