UNPKG

@limetech/lime-elements

Version:
14 lines 718 B
/** * Sanitizes email HTML to prevent XSS and other security issues while * preserving the original visual appearance (layout, colors, fonts, etc.). * * This differs from the markdown sanitizer (`sanitizeHTML`) in that: * - **All inline CSS is preserved** (no style property filtering). * - Dangerous CSS properties like `behavior`, `expression`, `-moz-binding` are removed. * - Standard dangerous tags/attributes are blocked (script, event handlers, javascript: URLs). * * @param html - The HTML string to sanitize (typically an email body). * @returns The sanitized HTML string. */ export declare function sanitizeEmailHTML(html: string): Promise<string>; //# sourceMappingURL=sanitize-email-html.d.ts.map