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.es.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 _typeof(obj) {
|
|
4
4
|
"@babel/helpers - typeof";
|
|
@@ -263,7 +263,7 @@ var IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
|
|
|
263
263
|
var ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
|
|
264
264
|
);
|
|
265
265
|
var DOCTYPE_NAME = seal(/^html$/i);
|
|
266
|
-
var CUSTOM_ELEMENT = seal(/^[a-z][
|
|
266
|
+
var CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
267
267
|
|
|
268
268
|
var getGlobal = function getGlobal() {
|
|
269
269
|
return typeof window === 'undefined' ? null : window;
|
|
@@ -325,7 +325,7 @@ function createDOMPurify() {
|
|
|
325
325
|
*/
|
|
326
326
|
|
|
327
327
|
|
|
328
|
-
DOMPurify.version = '2.4.
|
|
328
|
+
DOMPurify.version = '2.4.9';
|
|
329
329
|
/**
|
|
330
330
|
* Array of elements that DOMPurify removed during sanitation.
|
|
331
331
|
* Empty if nothing was removed.
|
|
@@ -987,7 +987,7 @@ function createDOMPurify() {
|
|
|
987
987
|
|
|
988
988
|
var _createIterator = function _createIterator(root) {
|
|
989
989
|
return createNodeIterator.call(root.ownerDocument || root, root, // eslint-disable-next-line no-bitwise
|
|
990
|
-
NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION, null, false);
|
|
990
|
+
NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null, false);
|
|
991
991
|
};
|
|
992
992
|
/**
|
|
993
993
|
* _isClobbered
|
|
@@ -1089,6 +1089,14 @@ function createDOMPurify() {
|
|
|
1089
1089
|
|
|
1090
1090
|
return true;
|
|
1091
1091
|
}
|
|
1092
|
+
/* Remove any ocurrence of processing instructions */
|
|
1093
|
+
|
|
1094
|
+
|
|
1095
|
+
if (currentNode.nodeType === 7) {
|
|
1096
|
+
_forceRemove(currentNode);
|
|
1097
|
+
|
|
1098
|
+
return true;
|
|
1099
|
+
}
|
|
1092
1100
|
/* Remove element if anything forbids its presence */
|
|
1093
1101
|
|
|
1094
1102
|
|