@types/sanitize-html 1.23.3 → 1.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
sanitize-html/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for sanitize-html (https://github.com/pun
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sanitize-html.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 30 Jun 2020 17:35:22 GMT
11
+ * Last updated: Wed, 09 Sep 2020 21:51:54 GMT
12
12
  * Dependencies: [@types/htmlparser2](https://npmjs.com/package/@types/htmlparser2)
13
13
  * Global values: none
14
14
 
sanitize-html/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for sanitize-html 1.23.0
1
+ // Type definitions for sanitize-html 1.27
2
2
  // Project: https://github.com/punkave/sanitize-html
3
3
  // Definitions by: Rogier Schouten <https://github.com/rogierschouten>
4
4
  // Afshin Darian <https://github.com/afshin>
@@ -13,7 +13,6 @@
13
13
  // Dariusz Syncerek <https://github.com/dsyncerek>
14
14
  // Piotr Błażejewicz <https://github.com/peterblazejewicz>
15
15
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
16
- // TypeScript Version: 2.2
17
16
 
18
17
  import { ParserOptions } from "htmlparser2";
19
18
 
@@ -22,11 +21,9 @@ export = sanitize;
22
21
  declare function sanitize(dirty: string, options?: sanitize.IOptions): string;
23
22
 
24
23
  declare namespace sanitize {
25
- type Attributes = { [attr: string]: string };
26
-
27
-
28
- type Tag = { tagName: string; attribs: Attributes; text?: string; };
24
+ interface Attributes { [attr: string]: string; }
29
25
 
26
+ interface Tag { tagName: string; attribs: Attributes; text?: string; }
30
27
 
31
28
  type Transformer = (tagName: string, attribs: Attributes) => Tag;
32
29
 
@@ -34,6 +31,7 @@ declare namespace sanitize {
34
31
 
35
32
  type DisallowedTagsModes = 'discard' | 'escape' | 'recursiveEscape';
36
33
 
34
+ // tslint:disable-next-line:interface-name
37
35
  interface IDefaults {
38
36
  allowedAttributes: { [index: string]: AllowedAttribute[] };
39
37
  allowedSchemes: string[];
@@ -46,6 +44,7 @@ declare namespace sanitize {
46
44
  selfClosing: string[];
47
45
  }
48
46
 
47
+ // tslint:disable-next-line:interface-name
49
48
  interface IFrame {
50
49
  tag: string;
51
50
  attribs: { [index: string]: string };
@@ -53,11 +52,12 @@ declare namespace sanitize {
53
52
  tagPosition: number;
54
53
  }
55
54
 
56
-
55
+ // tslint:disable-next-line:interface-name
57
56
  interface IOptions {
58
57
  allowedAttributes?: { [index: string]: AllowedAttribute[] } | boolean;
59
- allowedStyles?: { [index: string]: { [index: string]: RegExp[] } };
58
+ allowedStyles?: { [index: string]: { [index: string]: RegExp[] } };
60
59
  allowedClasses?: { [index: string]: string[] | boolean };
60
+ allowedIframeDomains?: string[];
61
61
  allowedIframeHostnames?: string[];
62
62
  allowIframeRelativeUrls?: boolean;
63
63
  allowedSchemes?: string[] | boolean;
@@ -65,7 +65,8 @@ declare namespace sanitize {
65
65
  allowedSchemesAppliedToAttributes?: string[];
66
66
  allowProtocolRelative?: boolean;
67
67
  allowedTags?: string[] | boolean;
68
- textFilter?: (text: string, tagName: string) => string;
68
+ allowVulnerableTags?: boolean;
69
+ textFilter?: (text: string, tagName: string) => string;
69
70
  exclusiveFilter?: (frame: IFrame) => boolean;
70
71
  nonTextTags?: string[];
71
72
  selfClosing?: string[];
@@ -81,9 +82,7 @@ declare namespace sanitize {
81
82
  enforceHtmlBoundary?: boolean;
82
83
  }
83
84
 
84
-
85
- var defaults: IDefaults;
86
-
85
+ let defaults: IDefaults;
87
86
 
88
87
  function simpleTransform(tagName: string, attribs: Attributes, merge?: boolean): Transformer;
89
88
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/sanitize-html",
3
- "version": "1.23.3",
3
+ "version": "1.27.0",
4
4
  "description": "TypeScript definitions for sanitize-html",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -76,6 +76,6 @@
76
76
  "dependencies": {
77
77
  "htmlparser2": "^4.1.0"
78
78
  },
79
- "typesPublisherContentHash": "225d70606c209bb187413b607b33e273f5da5683a9d355d0370f7457ae54b8f5",
80
- "typeScriptVersion": "3.0"
79
+ "typesPublisherContentHash": "749522d3339b44d998e9c6b83457b05baaff423dee1c839409ad0fe9ed006ed7",
80
+ "typeScriptVersion": "3.1"
81
81
  }