html5parser
Version:
A super fast & tiny HTML5 parser
9 lines (8 loc) • 318 B
TypeScript
export interface SafeHtmlOptions {
allowedTags: string[];
allowedAttrs: string[];
tagAllowedAttrs: Record<string, string[]>;
allowedUrl: RegExp;
}
export declare const safeHtmlDefaultOptions: SafeHtmlOptions;
export declare function safeHtml(input: string, options?: Partial<SafeHtmlOptions>): string;