/** * @file * * The HTML sanitizer behind the mocked `sanitizeHTMLToDom`: a port of the passes DOMPurify 3.0.1 runs with the * configuration Obsidian 1.14.2 passes it, plus the two `afterSanitizeAttributes` hooks Obsidian installs when it * loads. * * Ported: the element allowlist (with Obsidian's added `iframe` and forbidden `style`), keeping the content of a * removed element unless it is one whose content DOMPurify forbids, the namespace-nesting check, the markup-in-text * check, the attribute allowlist (with Obsidian's added attributes), `data-*` and `aria-*` attributes, the URI checks * with unknown protocols allowed, and the `id` / `name` clobbering check. Left out: the hooks Obsidian installs later * at runtime, Trusted Types, the options Obsidian does not set, and the `noscript` / `noembed` check, which cannot * fire because neither element is allowed. */ /** * Sanitizes an HTML string as Obsidian's `sanitizeHTMLToDom` does and returns the result as a fragment owned by the * global `document`. * * @param html - The HTML to sanitize. * @returns The sanitized content. */ export declare function sanitizeHtml(html: string): DocumentFragment;