/** * Strip everything a rendering page must not do. * * The page is rendered by a real Chromium with scripts disabled and DNS * mapped to nowhere, so this is defence in depth rather than the only guard: * removing the tags keeps a hostile document from even asking, and keeps a * render deterministic when a template accidentally points at the network. * * @module dsh-arya-image-gen/render/sanitize */ /** * Remove blocking elements, inline handlers and remote URLs. * * @param markup - HTML or SVG source. * @returns sanitized markup. */ export declare function sanitizeMarkup(markup: string): string; /** * The content security policy injected into every rendered page. * * Inline styles stay allowed because templates are style-heavy by nature; * scripts never are. */ export declare const RENDER_CSP = "default-src 'none'; img-src data: file: blob:; style-src 'unsafe-inline' data: file:; font-src data: file:; media-src data: file:"; /** * True when a URL scheme is one a rendered page may load. * * @param url - candidate URL. * @returns whether the scheme is allowed. */ export declare function isAllowedUrl(url: string): boolean;