import DOMPurify from "dompurify"; const feedConfig = { ALLOWED_TAGS: [ "a", "b", "i", "em", "strong", "u", "s", "br", "p", "span", "small", "sup", "sub", "code", ], ALLOWED_ATTR: ["href", "title"], ALLOWED_URI_REGEXP: /^(?:https?|mailto):/i, }; /** * Sanitise HTML coming from third-party RSS feeds before it reaches an `{@html}` * sink. Keeps the light formatting these feeds actually use (HTML entities, * ``/``/``) and strips anything that could inject content or * behaviour: `