Skip to content

Commit 7f154b3

Browse files
authored
Merge pull request #1030 from cure53/main
Getting 3.x branch ready for 3.2.1 release
2 parents f0d7507 + 83ce1cc commit 7f154b3

15 files changed

+54
-1379
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG.
88

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**.
1010

1111
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.
1212

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dompurify",
3-
"version": "3.2.0",
3+
"version": "3.2.1",
44
"homepage": "https://github.com/cure53/DOMPurify",
55
"author": "Cure53 <[email protected]>",
66
"description": "A DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG",

dist/purify.cjs.d.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -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 */
22

33
/**
44
* Configuration to control DOMPurify behavior.
@@ -206,9 +206,9 @@ declare const _default: DOMPurify;
206206

207207
interface DOMPurify {
208208
/**
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`.
210210
*/
211-
(root: WindowLike): DOMPurify;
211+
(root?: WindowLike): DOMPurify;
212212
/**
213213
* Version label, exposed for easier checks
214214
* if DOMPurify is up to date or not
@@ -396,6 +396,7 @@ type WindowLike = Pick<typeof globalThis, 'DocumentFragment' | 'HTMLTemplateElem
396396
trustedTypes?: typeof window.trustedTypes;
397397
};
398398

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 };
400400

401+
// @ts-ignore
401402
export = _default;

dist/purify.cjs.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/purify.es.d.mts

+4-4
Original file line numberDiff line numberDiff line change
@@ -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 */
22

33
/**
44
* Configuration to control DOMPurify behavior.
@@ -206,9 +206,9 @@ declare const _default: DOMPurify;
206206

207207
interface DOMPurify {
208208
/**
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`.
210210
*/
211-
(root: WindowLike): DOMPurify;
211+
(root?: WindowLike): DOMPurify;
212212
/**
213213
* Version label, exposed for easier checks
214214
* if DOMPurify is up to date or not
@@ -396,4 +396,4 @@ type WindowLike = Pick<typeof globalThis, 'DocumentFragment' | 'HTMLTemplateElem
396396
trustedTypes?: typeof window.trustedTypes;
397397
};
398398

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 };

dist/purify.es.mjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -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 */
22

33
const {
44
entries,
@@ -282,7 +282,7 @@ const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedType
282282
function createDOMPurify() {
283283
let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
284284
const DOMPurify = root => createDOMPurify(root);
285-
DOMPurify.version = '3.2.0';
285+
DOMPurify.version = '3.2.1';
286286
DOMPurify.removed = [];
287287
if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document) {
288288
// Not running in a browser, provide a factory function

dist/purify.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)