dompurify 2.3.11 → 2.3.12

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.
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG.
8
8
 
9
- It's also very simple to use and get started with. DOMPurify was [started in February 2014](https://github.com/cure53/DOMPurify/commit/a630922616927373485e0e787ab19e73e3691b2b) and, meanwhile, has reached version 2.3.11.
9
+ It's also very simple to use and get started with. DOMPurify was [started in February 2014](https://github.com/cure53/DOMPurify/commit/a630922616927373485e0e787ab19e73e3691b2b) and, meanwhile, has reached version 2.3.12.
10
10
 
11
11
  DOMPurify is written in JavaScript and works in all modern browsers (Safari (10+), Opera (15+), Internet Explorer (10+), Edge, Firefox and Chrome - as well as almost anything else using Blink or WebKit). It doesn't break on MSIE6 or other legacy browsers. It either uses [a fall-back](#what-about-older-browsers-like-msie8) or simply does nothing.
12
12
 
@@ -19,7 +19,7 @@ declare function purify(root: any): {
19
19
  * @param {String|Node} dirty string or DOM node
20
20
  * @param {Object} configuration object
21
21
  */
22
- sanitize(dirty: string | Node, cfg: any): any;
22
+ sanitize(dirty: string | Node, ...args: any[]): any;
23
23
  /**
24
24
  * Public method to set the configuration once
25
25
  * setConfig
@@ -86,7 +86,7 @@ declare namespace purify {
86
86
  * @param {String|Node} dirty string or DOM node
87
87
  * @param {Object} configuration object
88
88
  */
89
- function sanitize(dirty: string | Node, cfg: any): any;
89
+ function sanitize(dirty: string | Node, ...args: any[]): any;
90
90
  /**
91
91
  * Public method to set the configuration once
92
92
  * setConfig
@@ -1,4 +1,4 @@
1
- /*! @license DOMPurify 2.3.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.11/LICENSE */
1
+ /*! @license DOMPurify 2.3.12 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.12/LICENSE */
2
2
 
3
3
  'use strict';
4
4
 
@@ -322,7 +322,7 @@ function createDOMPurify() {
322
322
  */
323
323
 
324
324
 
325
- DOMPurify.version = '2.3.11';
325
+ DOMPurify.version = '2.3.12';
326
326
  /**
327
327
  * Array of elements that DOMPurify removed during sanitation.
328
328
  * Empty if nothing was removed.
@@ -1370,7 +1370,8 @@ function createDOMPurify() {
1370
1370
  // eslint-disable-next-line complexity
1371
1371
 
1372
1372
 
1373
- DOMPurify.sanitize = function (dirty, cfg) {
1373
+ DOMPurify.sanitize = function (dirty) {
1374
+ var cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1374
1375
  var body;
1375
1376
  var importedNode;
1376
1377
  var currentNode;