mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 15:27:05 +00:00
Add parser to sanitize-html's IOptions interface
This commit is contained in:
Vendored
+2
@@ -4,6 +4,7 @@
|
||||
// Afshin Darian <https://github.com/afshin>
|
||||
// BehindTheMath <https://github.com/BehindTheMath>
|
||||
// Rinze de Laat <https://github.com/biermeester>
|
||||
// Will Gibson <https://github.com/WillGibson>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = sanitize;
|
||||
@@ -51,6 +52,7 @@ declare namespace sanitize {
|
||||
nonTextTags?: string[];
|
||||
selfClosing?: string[];
|
||||
transformTags?: { [tagName: string]: string | Transformer };
|
||||
parser: {};
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -29,7 +29,10 @@ let options: sanitize.IOptions = {
|
||||
allowedSchemesByTag: {
|
||||
'a': ['http', 'https']
|
||||
},
|
||||
allowProtocolRelative: false
|
||||
allowProtocolRelative: false,
|
||||
parser: {
|
||||
decodeEntities: true
|
||||
}
|
||||
};
|
||||
|
||||
let unsafe = '<div><script>alert("hello");</script></div>';
|
||||
|
||||
Reference in New Issue
Block a user