diff --git a/types/sanitize-html/index.d.ts b/types/sanitize-html/index.d.ts
index 2e7527e3fc..88959fa0c6 100644
--- a/types/sanitize-html/index.d.ts
+++ b/types/sanitize-html/index.d.ts
@@ -4,8 +4,11 @@
// Afshin Darian
// BehindTheMath
// Rinze de Laat
+// Will Gibson
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+import {Options} from "htmlparser2";
+
export = sanitize;
declare function sanitize(dirty: string, options?: sanitize.IOptions): string;
@@ -51,6 +54,7 @@ declare namespace sanitize {
nonTextTags?: string[];
selfClosing?: string[];
transformTags?: { [tagName: string]: string | Transformer };
+ parser: Options;
}
diff --git a/types/sanitize-html/sanitize-html-tests.ts b/types/sanitize-html/sanitize-html-tests.ts
index b02a5a6653..51d03bf3fe 100644
--- a/types/sanitize-html/sanitize-html-tests.ts
+++ b/types/sanitize-html/sanitize-html-tests.ts
@@ -29,7 +29,10 @@ let options: sanitize.IOptions = {
allowedSchemesByTag: {
'a': ['http', 'https']
},
- allowProtocolRelative: false
+ allowProtocolRelative: false,
+ parser: {
+ decodeEntities: true
+ }
};
let unsafe = '';