import { parseDocument } from 'htmlparser2'; const DROP_WITH_CONTENT = new Set([ 'applet', 'base', 'basefont', 'embed', 'frame', 'frameset', 'iframe', 'isindex', 'link', 'meta', 'noframes', 'object', 'script', 'style', ]); // DOMPurify deliberately needs a browser DOM. The Meteor server bundle has no // DOM, so parse untrusted markup into a tree and retain text nodes only. Entity // decoding stays disabled: an encoded "