dompurify 3.2.0 → 3.2.1

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 **v3.2.0**.
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 **v3.2.1**.
10
10
 
11
11
  DOMPurify is written in JavaScript and works in all modern browsers (Safari (10+), Opera (15+), Edge, Firefox and Chrome - as well as almost anything else using Blink, Gecko or WebKit). It doesn't break on MSIE or other legacy browsers. It simply does nothing.
12
12
 
@@ -1,4 +1,4 @@
1
- /*! @license DOMPurify 3.2.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.0/LICENSE */
1
+ /*! @license DOMPurify 3.2.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.1/LICENSE */
2
2
 
3
3
  /**
4
4
  * Configuration to control DOMPurify behavior.
@@ -206,9 +206,9 @@ declare const _default: DOMPurify;
206
206
 
207
207
  interface DOMPurify {
208
208
  /**
209
- * Creates a DOMPurify instance using the given window-like object.
209
+ * Creates a DOMPurify instance using the given window-like object. Defaults to `window`.
210
210
  */
211
- (root: WindowLike): DOMPurify;
211
+ (root?: WindowLike): DOMPurify;
212
212
  /**
213
213
  * Version label, exposed for easier checks
214
214
  * if DOMPurify is up to date or not
@@ -396,6 +396,7 @@ type WindowLike = Pick<typeof globalThis, 'DocumentFragment' | 'HTMLTemplateElem
396
396
  trustedTypes?: typeof window.trustedTypes;
397
397
  };
398
398
 
399
- export { type Config, type Hook, type HookName, type RemovedAttribute, type RemovedElement, type UponSanitizeAttributeHook, type UponSanitizeAttributeHookEvent, type UponSanitizeElementHook, type UponSanitizeElementHookEvent, type WindowLike };
399
+ export { type Config, type DOMPurify, type Hook, type HookName, type RemovedAttribute, type RemovedElement, type UponSanitizeAttributeHook, type UponSanitizeAttributeHookEvent, type UponSanitizeElementHook, type UponSanitizeElementHookEvent, type WindowLike };
400
400
 
401
+ // @ts-ignore
401
402
  export = _default;
@@ -1,4 +1,4 @@
1
- /*! @license DOMPurify 3.2.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.0/LICENSE */
1
+ /*! @license DOMPurify 3.2.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.1/LICENSE */
2
2
 
3
3
  'use strict';
4
4
 
@@ -284,7 +284,7 @@ const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedType
284
284
  function createDOMPurify() {
285
285
  let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
286
286
  const DOMPurify = root => createDOMPurify(root);
287
- DOMPurify.version = '3.2.0';
287
+ DOMPurify.version = '3.2.1';
288
288
  DOMPurify.removed = [];
289
289
  if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document) {
290
290
  // Not running in a browser, provide a factory function
@@ -1,4 +1,4 @@
1
- /*! @license DOMPurify 3.2.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.0/LICENSE */
1
+ /*! @license DOMPurify 3.2.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.1/LICENSE */
2
2
 
3
3
  /**
4
4
  * Configuration to control DOMPurify behavior.
@@ -206,9 +206,9 @@ declare const _default: DOMPurify;
206
206
 
207
207
  interface DOMPurify {
208
208
  /**
209
- * Creates a DOMPurify instance using the given window-like object.
209
+ * Creates a DOMPurify instance using the given window-like object. Defaults to `window`.
210
210
  */
211
- (root: WindowLike): DOMPurify;
211
+ (root?: WindowLike): DOMPurify;
212
212
  /**
213
213
  * Version label, exposed for easier checks
214
214
  * if DOMPurify is up to date or not
@@ -396,4 +396,4 @@ type WindowLike = Pick<typeof globalThis, 'DocumentFragment' | 'HTMLTemplateElem
396
396
  trustedTypes?: typeof window.trustedTypes;
397
397
  };
398
398
 
399
- export { type Config, type Hook, type HookName, type RemovedAttribute, type RemovedElement, type UponSanitizeAttributeHook, type UponSanitizeAttributeHookEvent, type UponSanitizeElementHook, type UponSanitizeElementHookEvent, type WindowLike, _default as default };
399
+ export { type Config, type DOMPurify, type Hook, type HookName, type RemovedAttribute, type RemovedElement, type UponSanitizeAttributeHook, type UponSanitizeAttributeHookEvent, type UponSanitizeElementHook, type UponSanitizeElementHookEvent, type WindowLike, _default as default };
@@ -1,4 +1,4 @@
1
- /*! @license DOMPurify 3.2.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.0/LICENSE */
1
+ /*! @license DOMPurify 3.2.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.1/LICENSE */
2
2
 
3
3
  const {
4
4
  entries,
@@ -282,7 +282,7 @@ const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedType
282
282
  function createDOMPurify() {
283
283
  let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
284
284
  const DOMPurify = root => createDOMPurify(root);
285
- DOMPurify.version = '3.2.0';
285
+ DOMPurify.version = '3.2.1';
286
286
  DOMPurify.removed = [];
287
287
  if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document) {
288
288
  // Not running in a browser, provide a factory function
package/dist/purify.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @license DOMPurify 3.2.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.0/LICENSE */
1
+ /*! @license DOMPurify 3.2.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.1/LICENSE */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -288,7 +288,7 @@
288
288
  function createDOMPurify() {
289
289
  let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
290
290
  const DOMPurify = root => createDOMPurify(root);
291
- DOMPurify.version = '3.2.0';
291
+ DOMPurify.version = '3.2.1';
292
292
  DOMPurify.removed = [];
293
293
  if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document) {
294
294
  // Not running in a browser, provide a factory function