import { type HTMLAttributes } from 'react'; /** * The only permissible carrier of `dangerouslySetInnerHTML` in the repo * (per `23-constraints.mdx §8` + `12-security.mdx §12.1`). ESLint's * `react/no-danger` rule is expected to ignore this file and fail everywhere * else. * * `profile` switches between sanitiser configurations tuned for the three * surfaces that have a legitimate need for raw HTML: * - `markdown` — narrow inline HTML inside a Markdown pipeline (links, * strong/em, simple code, lists). Used by ChatMessage's LLM output. * - `email` — paragraphs + links only; everything else coerced to text. * Used for rendering transactional email previews. * - `rich-text`— full Redactor-compatible HTML (headings, lists, tables, * inline formatting, safe images, safe links). Used by RichTextEditor * when setting / reading content programmatically. * * Pasted HTML / LLM output flowing through `SafeHtml` is always stripped * of script tags, on* attributes, `form`/`object`/`embed`/`base`/`meta` * tags, and every scheme outside http/https/mailto/tel on links or the * raster set on images. */ export type SafeHtmlProfile = 'markdown' | 'email' | 'rich-text'; export declare function sanitiseHtml(html: string, profile: SafeHtmlProfile): string; export interface SafeHtmlProps extends Omit, 'dangerouslySetInnerHTML'> { html: string; profile?: SafeHtmlProfile; } export declare const SafeHtml: import("react").ForwardRefExoticComponent>; //# sourceMappingURL=safe-html.d.ts.map