forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sanitizer.d.ts
27 lines (21 loc) · 878 Bytes
/
sanitizer.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Type definitions for Sanitizer
// Project: https://github.com/theSmaw/Caja-HTML-Sanitizer
// Definitions by: Dave Taylor <http://davetayls.me>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module '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 function escape(s:string):string;
export function makeSaxParser(yourHandler:ISaxHandler):(...any:any[])=>any;
export function normalizeRCData(s:string):string;
export function sanitize(s:string):string;
export function unescapeEntities(s:string):string;
}