Installation
npm install --save @types/sanitizer
Summary
This package contains type definitions for sanitizer (https://github.com/theSmaw/Caja-HTML-Sanitizer).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sanitizer.
export interface ISaxHandler {
startTag(name: string, attribs: string[], param: any): void;
endTag(name: string, param: any): void;
pcdata(text: string, param: any): void;
cdata(text: string, param: any): void;
rcdata(text: string, param: any): void;
comment(text: string, param: any): void;
startDoc(param: any): void;
endDoc(param: any): void;
}
export declare function escape(s: string): string;
export declare function makeSaxParser(yourHandler: ISaxHandler): (...any: any[]) => any;
export declare function normalizeRCData(s: string): string;
export declare function sanitize(s: string): string;
export declare function unescapeEntities(s: string): string;
Additional Details
- Last updated: Tue, 07 Nov 2023 15:11:36 GMT
- Dependencies: none
Credits
These definitions were written by Dave Taylor.