dompurify 3.0.10 → 3.0.11
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 +2 -2
- package/dist/purify.cjs.js +10 -4
- package/dist/purify.cjs.js.map +1 -1
- package/dist/purify.es.mjs +10 -4
- package/dist/purify.es.mjs.map +1 -1
- package/dist/purify.js +10 -4
- package/dist/purify.js.map +1 -1
- package/dist/purify.min.js +2 -2
- package/dist/purify.min.js.map +1 -1
- package/package.json +1 -1
package/dist/purify.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @license DOMPurify 3.0.
|
|
1
|
+
/*! @license DOMPurify 3.0.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.11/LICENSE */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
);
|
|
222
222
|
|
|
223
223
|
const DOCTYPE_NAME = seal(/^html$/i);
|
|
224
|
-
const CUSTOM_ELEMENT = seal(/^[a-z][
|
|
224
|
+
const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
225
225
|
|
|
226
226
|
var EXPRESSIONS = /*#__PURE__*/Object.freeze({
|
|
227
227
|
__proto__: null,
|
|
@@ -288,7 +288,7 @@
|
|
|
288
288
|
* Version label, exposed for easier checks
|
|
289
289
|
* if DOMPurify is up to date or not
|
|
290
290
|
*/
|
|
291
|
-
DOMPurify.version = '3.0.
|
|
291
|
+
DOMPurify.version = '3.0.11';
|
|
292
292
|
|
|
293
293
|
/**
|
|
294
294
|
* Array of elements that DOMPurify removed during sanitation.
|
|
@@ -915,7 +915,7 @@
|
|
|
915
915
|
const _createNodeIterator = function _createNodeIterator(root) {
|
|
916
916
|
return createNodeIterator.call(root.ownerDocument || root, root,
|
|
917
917
|
// eslint-disable-next-line no-bitwise
|
|
918
|
-
NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION, null);
|
|
918
|
+
NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);
|
|
919
919
|
};
|
|
920
920
|
|
|
921
921
|
/**
|
|
@@ -992,6 +992,12 @@
|
|
|
992
992
|
return true;
|
|
993
993
|
}
|
|
994
994
|
|
|
995
|
+
/* Remove any ocurrence of processing instructions */
|
|
996
|
+
if (currentNode.nodeType === 7) {
|
|
997
|
+
_forceRemove(currentNode);
|
|
998
|
+
return true;
|
|
999
|
+
}
|
|
1000
|
+
|
|
995
1001
|
/* Remove element if anything forbids its presence */
|
|
996
1002
|
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
|
|
997
1003
|
/* Check if we have a custom element to handle */
|