import DOMPurify from "isomorphic-dompurify"; enum DOMPurifyHook { UponSanitizeAttribute = "uponSanitizeAttribute", AfterSanitizeAttributes = "afterSanitizeAttributes", } const ALLOWED_STYLE_PROPERTIES = [ "background-color", "color", "font-style", "font-weight", "text-decoration", "text-align", ]; const BASE_ALLOWED_TAGS = [ "strong", "em", "b", "i", "u", "p", "code", "pre", "samp", "kbd", "var", "sub", "sup", "dfn", "cite", "small", "address", "hr", "br", "id", "div", "span", "h1", "h2", "h3", "h4", "h5", "h6", "ul", "ol", "li", "dl", "dt", "dd", "abbr", "a", "img", "blockquote", "del", "ins", "table", "thead", "tbody", "tfoot", "tr", "th", "td", "colgroup", ]; const BASE_ALLOWED_ATTR = [ "href", "src", "alt", "height", "width", "class", "title", "cite", "datetime", "name", "abbr", "target", "border", "start", "style", ]; // Attributes only meaningful on an