dompurify 2.4.8 → 2.4.9
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 +1 -1
- package/dist/purify.cjs.js +12 -4
- package/dist/purify.cjs.js.map +1 -1
- package/dist/purify.es.js +12 -4
- package/dist/purify.es.js.map +1 -1
- package/dist/purify.js +12 -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 2.4.
|
|
1
|
+
/*! @license DOMPurify 2.4.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.9/LICENSE */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -269,7 +269,7 @@
|
|
|
269
269
|
var ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
|
|
270
270
|
);
|
|
271
271
|
var DOCTYPE_NAME = seal(/^html$/i);
|
|
272
|
-
var CUSTOM_ELEMENT = seal(/^[a-z][
|
|
272
|
+
var CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
273
273
|
|
|
274
274
|
var getGlobal = function getGlobal() {
|
|
275
275
|
return typeof window === 'undefined' ? null : window;
|
|
@@ -331,7 +331,7 @@
|
|
|
331
331
|
*/
|
|
332
332
|
|
|
333
333
|
|
|
334
|
-
DOMPurify.version = '2.4.
|
|
334
|
+
DOMPurify.version = '2.4.9';
|
|
335
335
|
/**
|
|
336
336
|
* Array of elements that DOMPurify removed during sanitation.
|
|
337
337
|
* Empty if nothing was removed.
|
|
@@ -993,7 +993,7 @@
|
|
|
993
993
|
|
|
994
994
|
var _createIterator = function _createIterator(root) {
|
|
995
995
|
return createNodeIterator.call(root.ownerDocument || root, root, // eslint-disable-next-line no-bitwise
|
|
996
|
-
NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION, null, false);
|
|
996
|
+
NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null, false);
|
|
997
997
|
};
|
|
998
998
|
/**
|
|
999
999
|
* _isClobbered
|
|
@@ -1095,6 +1095,14 @@
|
|
|
1095
1095
|
|
|
1096
1096
|
return true;
|
|
1097
1097
|
}
|
|
1098
|
+
/* Remove any ocurrence of processing instructions */
|
|
1099
|
+
|
|
1100
|
+
|
|
1101
|
+
if (currentNode.nodeType === 7) {
|
|
1102
|
+
_forceRemove(currentNode);
|
|
1103
|
+
|
|
1104
|
+
return true;
|
|
1105
|
+
}
|
|
1098
1106
|
/* Remove element if anything forbids its presence */
|
|
1099
1107
|
|
|
1100
1108
|
|