@liquidcommerceteam/elements-sdk
Version:
LiquidCommerce Elements SDK
17 lines (16 loc) • 513 B
TypeScript
/**
* HTML Sanitizer with TypeScript Support
*/
export type AllowedHTMLTags = 'span' | 'p' | 'a' | 'b' | 'i' | 'div' | 'strong' | 'em' | 'u' | 'br';
export interface SafeHTMLElementOptions {
cssClasses?: string[];
attributes?: Record<string, string>;
}
export interface SafeLabelOptions {
forId?: string;
cssClasses?: string[];
}
/**
* Sanitizes HTML content by allowing only specified tags
*/
export declare function sanitizeHTML(htmlString: string, allowedTags?: AllowedHTMLTags[]): string;