@knime/kds-table 11.4.0 → 11.6.0
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/CHANGELOG.md +18 -0
- package/dist/index.css +1 -1
- package/dist/index.js +286 -202
- package/dist/index.js.map +1 -1
- package/dist/src/components/TableUIWithAutoSizeCalculation.vue.d.ts.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1484,7 +1484,9 @@ var J = function(e) {
|
|
|
1484
1484
|
cancelAnimationFrame(r), r = null;
|
|
1485
1485
|
}, o;
|
|
1486
1486
|
};
|
|
1487
|
-
var Q = /* @__PURE__ */ H(J)
|
|
1487
|
+
var Q = /* @__PURE__ */ H(J);
|
|
1488
|
+
var X = 500;
|
|
1489
|
+
var L = ({ sizeManager: t, buffer: e = X }, r = "vertical", n = null) => {
|
|
1488
1490
|
const o = ref({
|
|
1489
1491
|
scrollStart: 0,
|
|
1490
1492
|
scrollEnd: 0
|
|
@@ -1529,7 +1531,8 @@ var Q = /* @__PURE__ */ H(J), X = 500, L = ({ sizeManager: t, buffer: e = X }, r
|
|
|
1529
1531
|
indices: p,
|
|
1530
1532
|
scrolledAreaStyles: M
|
|
1531
1533
|
};
|
|
1532
|
-
}
|
|
1534
|
+
};
|
|
1535
|
+
var te = (t) => {
|
|
1533
1536
|
const e = ref(null), r = L(t.rows, "vertical", e), n = L(t.columns, "horizontal", e), c = () => {
|
|
1534
1537
|
r.containerProps.onScroll(), n.containerProps.onScroll();
|
|
1535
1538
|
};
|
|
@@ -1547,7 +1550,9 @@ var Q = /* @__PURE__ */ H(J), X = 500, L = ({ sizeManager: t, buffer: e = X }, r
|
|
|
1547
1550
|
horizontal: n.indices
|
|
1548
1551
|
}
|
|
1549
1552
|
};
|
|
1550
|
-
}
|
|
1553
|
+
};
|
|
1554
|
+
var z = (t, e) => isRef(t) && watch(() => t.value, e);
|
|
1555
|
+
var Y = (t, e) => Math.floor(t / e);
|
|
1551
1556
|
var re = class {
|
|
1552
1557
|
constructor(e, r) {
|
|
1553
1558
|
u(this, "numItems");
|
|
@@ -1662,8 +1667,8 @@ var oe = class extends b {
|
|
|
1662
1667
|
}
|
|
1663
1668
|
};
|
|
1664
1669
|
//#endregion
|
|
1665
|
-
//#region ../../node_modules/.pnpm/dompurify@3.4.
|
|
1666
|
-
/*! @license DOMPurify 3.4.
|
|
1670
|
+
//#region ../../node_modules/.pnpm/dompurify@3.4.17/node_modules/dompurify/dist/purify.es.mjs
|
|
1671
|
+
/*! @license DOMPurify 3.4.17 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.17/LICENSE */
|
|
1667
1672
|
function _OverloadYield(e, d) {
|
|
1668
1673
|
this.v = e, this.k = d;
|
|
1669
1674
|
}
|
|
@@ -1787,9 +1792,12 @@ Array.prototype.indexOf;
|
|
|
1787
1792
|
var arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
|
|
1788
1793
|
var arrayPop = unapply(Array.prototype.pop);
|
|
1789
1794
|
var arrayPush = unapply(Array.prototype.push);
|
|
1790
|
-
Array.prototype.slice;
|
|
1795
|
+
var arraySlice = unapply(Array.prototype.slice);
|
|
1791
1796
|
var arraySplice = unapply(Array.prototype.splice);
|
|
1792
1797
|
var arrayIsArray = Array.isArray;
|
|
1798
|
+
var setCreate = unconstruct(Set);
|
|
1799
|
+
var setAdd = unapply(Set.prototype.add);
|
|
1800
|
+
var setHas = unapply(Set.prototype.has);
|
|
1793
1801
|
var stringToLowerCase = unapply(String.prototype.toLowerCase);
|
|
1794
1802
|
var stringToString = unapply(String.prototype.toString);
|
|
1795
1803
|
var stringMatch = unapply(String.prototype.match);
|
|
@@ -1932,6 +1940,25 @@ function lookupGetter(object, prop) {
|
|
|
1932
1940
|
}
|
|
1933
1941
|
return fallbackValue;
|
|
1934
1942
|
}
|
|
1943
|
+
/**
|
|
1944
|
+
* Like lookupGetter, but for accessor properties only, and returns null
|
|
1945
|
+
* instead of a null-returning fallback when no getter exists on the chain.
|
|
1946
|
+
* Lets a caller fall back to a direct property read in environments that
|
|
1947
|
+
* lack the getter, where a fallback returning null would be indistinguishable
|
|
1948
|
+
* from a legitimate null value (e.g. namespaceURI of a no-namespace element).
|
|
1949
|
+
*
|
|
1950
|
+
* @param object - The object (usually a prototype) to start the lookup at.
|
|
1951
|
+
* @param prop - The accessor property name.
|
|
1952
|
+
* @returns The unapplied getter, or null if none was found.
|
|
1953
|
+
*/
|
|
1954
|
+
function lookupAccessor(object, prop) {
|
|
1955
|
+
while (object !== null) {
|
|
1956
|
+
const desc = getOwnPropertyDescriptor(object, prop);
|
|
1957
|
+
if (desc) return desc.get ? unapply(desc.get) : null;
|
|
1958
|
+
object = getPrototypeOf(object);
|
|
1959
|
+
}
|
|
1960
|
+
return null;
|
|
1961
|
+
}
|
|
1935
1962
|
function isRegex(value) {
|
|
1936
1963
|
try {
|
|
1937
1964
|
regExpTest(value, "");
|
|
@@ -2616,7 +2643,7 @@ var NODE_TYPE = {
|
|
|
2616
2643
|
documentFragment: 11,
|
|
2617
2644
|
notation: 12
|
|
2618
2645
|
};
|
|
2619
|
-
var
|
|
2646
|
+
var LITERAL_TEXT_ELEMENTS = freeze(addToSet({}, [
|
|
2620
2647
|
"style",
|
|
2621
2648
|
"script",
|
|
2622
2649
|
"xmp",
|
|
@@ -2625,15 +2652,7 @@ var LITERAL_TEXT_ELEMENT_NAMES = [
|
|
|
2625
2652
|
"noframes",
|
|
2626
2653
|
"plaintext",
|
|
2627
2654
|
"noscript"
|
|
2628
|
-
];
|
|
2629
|
-
var LITERAL_TEXT_ELEMENTS = freeze(addToSet({}, LITERAL_TEXT_ELEMENT_NAMES));
|
|
2630
|
-
var LITERAL_TEXT_CLOSE = function() {
|
|
2631
|
-
const map = {};
|
|
2632
|
-
arrayForEach(LITERAL_TEXT_ELEMENT_NAMES, (name) => {
|
|
2633
|
-
map[name] = seal(new RegExp("</" + name + "(?=[\\t\\n\\f\\r />])", "i"));
|
|
2634
|
-
});
|
|
2635
|
-
return freeze(map);
|
|
2636
|
-
}();
|
|
2655
|
+
]));
|
|
2637
2656
|
var getGlobal = function getGlobal() {
|
|
2638
2657
|
return typeof window === "undefined" ? null : window;
|
|
2639
2658
|
};
|
|
@@ -2711,7 +2730,7 @@ var _resolveObjectOption = function _resolveObjectOption(cfg, key, makeFallback)
|
|
|
2711
2730
|
function createDOMPurify() {
|
|
2712
2731
|
let window = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
|
|
2713
2732
|
const DOMPurify = (root) => createDOMPurify(root);
|
|
2714
|
-
DOMPurify.version = "3.4.
|
|
2733
|
+
DOMPurify.version = "3.4.17";
|
|
2715
2734
|
DOMPurify.removed = [];
|
|
2716
2735
|
if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
|
|
2717
2736
|
DOMPurify.isSupported = false;
|
|
@@ -2743,6 +2762,10 @@ function createDOMPurify() {
|
|
|
2743
2762
|
const _readNodeName = function _readNodeName(node) {
|
|
2744
2763
|
return getNodeName ? getNodeName(node) : node.nodeName;
|
|
2745
2764
|
};
|
|
2765
|
+
const getNamespaceURI = lookupAccessor(ElementPrototype, "namespaceURI");
|
|
2766
|
+
const _readNamespaceURI = function _readNamespaceURI(element) {
|
|
2767
|
+
return getNamespaceURI ? getNamespaceURI(element) : element.namespaceURI;
|
|
2768
|
+
};
|
|
2746
2769
|
if (typeof HTMLTemplateElement === "function") {
|
|
2747
2770
|
const template = document.createElement("template");
|
|
2748
2771
|
if (template.content && template.content.ownerDocument) document = template.content.ownerDocument;
|
|
@@ -2863,6 +2886,7 @@ function createDOMPurify() {
|
|
|
2863
2886
|
const SANITIZE_NAMED_PROPS_PREFIX = "user-content-";
|
|
2864
2887
|
let KEEP_CONTENT = true;
|
|
2865
2888
|
let IN_PLACE = false;
|
|
2889
|
+
let IN_PLACE_VISITED = null;
|
|
2866
2890
|
let USE_PROFILES = {};
|
|
2867
2891
|
let FORBID_CONTENTS = null;
|
|
2868
2892
|
const DEFAULT_FORBID_CONTENTS = addToSet({}, [
|
|
@@ -3136,18 +3160,23 @@ function createDOMPurify() {
|
|
|
3136
3160
|
* return. Return true otherwise.
|
|
3137
3161
|
*/
|
|
3138
3162
|
const _checkValidNamespace = function _checkValidNamespace(element) {
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3163
|
+
const elementNamespace = _readNamespaceURI(element);
|
|
3164
|
+
const tagName = stringToLowerCase(_readNodeName(element));
|
|
3165
|
+
const parentNode = getParentNode(element);
|
|
3166
|
+
let parent;
|
|
3167
|
+
let parentTagName;
|
|
3168
|
+
if (parentNode && _readNodeType(parentNode) === NODE_TYPE.element) {
|
|
3169
|
+
parent = { namespaceURI: _readNamespaceURI(parentNode) };
|
|
3170
|
+
parentTagName = stringToLowerCase(_readNodeName(parentNode));
|
|
3171
|
+
} else {
|
|
3172
|
+
parent = { namespaceURI: NAMESPACE };
|
|
3173
|
+
parentTagName = "template";
|
|
3174
|
+
}
|
|
3175
|
+
if (!ALLOWED_NAMESPACES[elementNamespace]) return false;
|
|
3176
|
+
if (elementNamespace === SVG_NAMESPACE) return _checkSvgNamespace(tagName, parent, parentTagName);
|
|
3177
|
+
if (elementNamespace === MATHML_NAMESPACE) return _checkMathMlNamespace(tagName, parent, parentTagName);
|
|
3178
|
+
if (elementNamespace === HTML_NAMESPACE) return _checkHtmlNamespace(tagName, parent, parentTagName);
|
|
3179
|
+
if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && ALLOWED_NAMESPACES[elementNamespace]) return true;
|
|
3151
3180
|
return false;
|
|
3152
3181
|
};
|
|
3153
3182
|
/**
|
|
@@ -3191,36 +3220,21 @@ function createDOMPurify() {
|
|
|
3191
3220
|
}
|
|
3192
3221
|
};
|
|
3193
3222
|
/**
|
|
3194
|
-
*
|
|
3195
|
-
*
|
|
3196
|
-
*
|
|
3197
|
-
* (campaign-3 F2). An internal throw mid-walk — e.g. a page-registered
|
|
3198
|
-
* custom element's reaction detaches a node so `_forceRemove`'s deliberate
|
|
3199
|
-
* parentless guard throws, or any other re-entrant engine mutation — would
|
|
3200
|
-
* otherwise leave the caller's *live* tree half-sanitized, with everything
|
|
3201
|
-
* after the abort point still carrying its handlers. There is no safe way
|
|
3202
|
-
* to resume the walk (the tree mutated under us), so we strip the root bare:
|
|
3203
|
-
* remove every child and every attribute, then let the caller's catch see
|
|
3204
|
-
* the original error. Clobber-safe (cached `remove`/`childNodes`/`attributes`
|
|
3205
|
-
* getters; the root was already clobber-pre-flighted at the IN_PLACE entry).
|
|
3223
|
+
* Fail-closed teardown of an in-place root: strip every disallowed attribute
|
|
3224
|
+
* in the subtree first, so nothing armed is left behind, then remove all
|
|
3225
|
+
* children and the root's own attributes.
|
|
3206
3226
|
*
|
|
3207
3227
|
* @param root the in-place root to empty
|
|
3208
3228
|
*/
|
|
3209
3229
|
const _neutralizeRoot = function _neutralizeRoot(root) {
|
|
3210
3230
|
_neutralizeSubtree(root);
|
|
3211
3231
|
const childNodes = getChildNodes(root);
|
|
3212
|
-
if (childNodes) {
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
try {
|
|
3219
|
-
remove(child);
|
|
3220
|
-
} catch (_) {}
|
|
3221
|
-
});
|
|
3222
|
-
}
|
|
3223
|
-
const attributes = getAttributes(root);
|
|
3232
|
+
if (childNodes) arrayForEach(arraySlice(childNodes), (child) => {
|
|
3233
|
+
try {
|
|
3234
|
+
remove(child);
|
|
3235
|
+
} catch (_) {}
|
|
3236
|
+
});
|
|
3237
|
+
const attributes = _readNodeType(root) === NODE_TYPE.element ? getAttributes(root) : null;
|
|
3224
3238
|
if (attributes) for (let i = attributes.length - 1; i >= 0; --i) {
|
|
3225
3239
|
const attribute = attributes[i];
|
|
3226
3240
|
const name = attribute && attribute.name;
|
|
@@ -3228,18 +3242,9 @@ function createDOMPurify() {
|
|
|
3228
3242
|
}
|
|
3229
3243
|
};
|
|
3230
3244
|
/**
|
|
3231
|
-
*
|
|
3232
|
-
*
|
|
3233
|
-
*
|
|
3234
|
-
* lookup key for HTML elements in an HTML document, so they silently miss an
|
|
3235
|
-
* attribute whose stored qualified name still contains uppercase ASCII
|
|
3236
|
-
* letters. That happens when the node came from a case-preserving source
|
|
3237
|
-
* (an XML/XHTML document imported via importNode(), or createAttributeNS()),
|
|
3238
|
-
* where e.g. `ONERROR` survives the walk: the policy check lowercases to
|
|
3239
|
-
* `onerror` and rejects it, but `removeAttribute('ONERROR')` looks up
|
|
3240
|
-
* `onerror` and finds nothing. Remove the exact Attr node instead, which is
|
|
3241
|
-
* case- and namespace-exact, and fall back to name-based removal only when
|
|
3242
|
-
* the caller could not supply the node.
|
|
3245
|
+
* Removes an attribute, preferably as its exact Attr node: name-based
|
|
3246
|
+
* removal lowercases the name in HTML documents and misses case-preserved
|
|
3247
|
+
* names, e.g. from imported XHTML.
|
|
3243
3248
|
*
|
|
3244
3249
|
* @param name an Attribute name
|
|
3245
3250
|
* @param element a DOM node
|
|
@@ -3271,12 +3276,8 @@ function createDOMPurify() {
|
|
|
3271
3276
|
} catch (_) {}
|
|
3272
3277
|
};
|
|
3273
3278
|
/**
|
|
3274
|
-
*
|
|
3275
|
-
*
|
|
3276
|
-
* Removes every attribute the active configuration does not allow from a
|
|
3277
|
-
* single element, using the same allowlist as the main attribute pass (so
|
|
3278
|
-
* `on*` handlers go, but no `/^on/` blocklist is introduced). Used only to
|
|
3279
|
-
* neutralise nodes that are being discarded from an in-place tree.
|
|
3279
|
+
* Removes every attribute the configuration does not allow. Used to
|
|
3280
|
+
* neutralize nodes discarded from an in-place tree.
|
|
3280
3281
|
*
|
|
3281
3282
|
* @param element the element to strip
|
|
3282
3283
|
*/
|
|
@@ -3291,77 +3292,158 @@ function createDOMPurify() {
|
|
|
3291
3292
|
}
|
|
3292
3293
|
};
|
|
3293
3294
|
/**
|
|
3294
|
-
*
|
|
3295
|
-
*
|
|
3296
|
-
*
|
|
3297
|
-
*
|
|
3298
|
-
* namespace, comment, processing-instruction and KEEP_CONTENT:false removals
|
|
3299
|
-
* all drop their subtree wholesale via `_forceRemove`. On the IN_PLACE path
|
|
3300
|
-
* those dropped nodes are detached from the caller's LIVE tree but a
|
|
3301
|
-
* handler-bearing original among them (an `<img onerror>`/`<video>` that was
|
|
3302
|
-
* loading) keeps its queued resource event, which fires in page scope after
|
|
3303
|
-
* sanitize returns. This walks a removed subtree and strips every attribute
|
|
3304
|
-
* the active configuration does not allow — so `on*` handlers are cancelled
|
|
3305
|
-
* through the SAME allowlist that governs kept nodes, not a separate `/^on/`
|
|
3306
|
-
* blocklist. Run synchronously before sanitize returns, i.e. before any
|
|
3307
|
-
* queued event can fire. Hook-free by design: these nodes leave the output,
|
|
3308
|
-
* so firing attribute hooks for them would be surprising. Clobber-safe reads;
|
|
3309
|
-
* a doomed clobbered node may shadow `removeAttribute` (its own attributes are
|
|
3310
|
-
* irrelevant — it is discarded — while its non-clobbered descendants, e.g.
|
|
3311
|
-
* the `<img>`, are reached and scrubbed).
|
|
3295
|
+
* Iterative depth-first walk, so deep trees cannot overflow the call stack,
|
|
3296
|
+
* reading through the cached getters, so clobbering cannot hide children.
|
|
3297
|
+
* When `visit` returns false, the node's children are skipped. With
|
|
3298
|
+
* `intoShadow`, open shadow roots are walked after their host's children.
|
|
3312
3299
|
*
|
|
3313
|
-
* @param root
|
|
3300
|
+
* @param root where to start
|
|
3301
|
+
* @param visit called for every node
|
|
3302
|
+
* @param intoShadow whether to enter open shadow roots
|
|
3314
3303
|
*/
|
|
3315
|
-
const
|
|
3304
|
+
const _walkTree = function _walkTree(root, visit) {
|
|
3305
|
+
let intoShadow = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
3316
3306
|
const stack = [root];
|
|
3317
3307
|
while (stack.length > 0) {
|
|
3318
3308
|
const node = stack.pop();
|
|
3319
|
-
if (
|
|
3309
|
+
if (visit(node) === false) continue;
|
|
3310
|
+
if (intoShadow && _readNodeType(node) === NODE_TYPE.element) {
|
|
3311
|
+
const shadowRoot = getShadowRoot(node);
|
|
3312
|
+
if (_isDocumentFragment(shadowRoot)) stack.push(shadowRoot);
|
|
3313
|
+
}
|
|
3320
3314
|
const childNodes = getChildNodes(node);
|
|
3321
3315
|
if (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push(childNodes[i]);
|
|
3322
3316
|
}
|
|
3323
3317
|
};
|
|
3324
3318
|
/**
|
|
3325
|
-
*
|
|
3319
|
+
* Strips disallowed attributes from every element of a discarded subtree,
|
|
3320
|
+
* so a handler that is already queued (a loading image) cannot fire.
|
|
3326
3321
|
*
|
|
3327
|
-
*
|
|
3328
|
-
|
|
3322
|
+
* @param root the root of a removed subtree
|
|
3323
|
+
*/
|
|
3324
|
+
const _neutralizeSubtree = function _neutralizeSubtree(root) {
|
|
3325
|
+
_walkTree(root, (node) => {
|
|
3326
|
+
if (_readNodeType(node) === NODE_TYPE.element) _stripDisallowedAttributes(node);
|
|
3327
|
+
});
|
|
3328
|
+
};
|
|
3329
|
+
/**
|
|
3330
|
+
* All nodes under `root`, root first, including open shadow roots. Template
|
|
3331
|
+
* content is not entered, it is inert.
|
|
3329
3332
|
*
|
|
3330
|
-
*
|
|
3331
|
-
*
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3333
|
+
* @param root the in-place root
|
|
3334
|
+
* @return the nodes
|
|
3335
|
+
*/
|
|
3336
|
+
const _collectLiveNodes = function _collectLiveNodes(root) {
|
|
3337
|
+
const nodes = [];
|
|
3338
|
+
_walkTree(root, (node) => {
|
|
3339
|
+
nodes.push(node);
|
|
3340
|
+
}, true);
|
|
3341
|
+
return nodes;
|
|
3342
|
+
};
|
|
3343
|
+
/**
|
|
3344
|
+
* Strips disallowed attributes from every element that was under the
|
|
3345
|
+
* in-place root when the call started and no longer is, whatever removed
|
|
3346
|
+
* or moved it.
|
|
3340
3347
|
*
|
|
3341
|
-
*
|
|
3342
|
-
*
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3348
|
+
* @param root the in-place root
|
|
3349
|
+
* @param before the root's nodes, collected before the walk
|
|
3350
|
+
*/
|
|
3351
|
+
const _neutralizeEscapedElements = function _neutralizeEscapedElements(root, before) {
|
|
3352
|
+
const reachable = setCreate();
|
|
3353
|
+
arrayForEach(_collectLiveNodes(root), (node) => {
|
|
3354
|
+
if (_readNodeType(node) === NODE_TYPE.element) setAdd(reachable, node);
|
|
3355
|
+
});
|
|
3356
|
+
arrayForEach(before, (node) => {
|
|
3357
|
+
if (_readNodeType(node) === NODE_TYPE.element && !setHas(reachable, node)) _stripDisallowedAttributes(node);
|
|
3358
|
+
});
|
|
3359
|
+
};
|
|
3360
|
+
/**
|
|
3361
|
+
* Neutralizes everything that left the in-place tree during the call: what
|
|
3362
|
+
* DOMPurify removed, and what hooks or custom elements removed or moved out.
|
|
3346
3363
|
*
|
|
3347
|
-
*
|
|
3348
|
-
*
|
|
3364
|
+
* @param root the in-place root
|
|
3365
|
+
* @param before the root's nodes, collected before the walk
|
|
3366
|
+
* @return true if the root itself was removed
|
|
3367
|
+
*/
|
|
3368
|
+
const _neutralizeDiscarded = function _neutralizeDiscarded(root, before) {
|
|
3369
|
+
let rootRemoved = false;
|
|
3370
|
+
arrayForEach(DOMPurify.removed, (entry) => {
|
|
3371
|
+
if (entry.element) {
|
|
3372
|
+
rootRemoved = rootRemoved || entry.element === root;
|
|
3373
|
+
_neutralizeSubtree(entry.element);
|
|
3374
|
+
}
|
|
3375
|
+
});
|
|
3376
|
+
_neutralizeEscapedElements(root, before);
|
|
3377
|
+
return rootRemoved;
|
|
3378
|
+
};
|
|
3379
|
+
const MAX_UNVISITED_ROUNDS = 8;
|
|
3380
|
+
/**
|
|
3381
|
+
* The walk only moves forward, so a node moved to a position it already
|
|
3382
|
+
* passed is never visited. Give every original node that is still in the
|
|
3383
|
+
* tree but unvisited the normal treatment, hooks included. Nodes created
|
|
3384
|
+
* during the call are left alone. Fails closed if the tree keeps changing.
|
|
3349
3385
|
*
|
|
3350
|
-
*
|
|
3351
|
-
*
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3386
|
+
* @param root the in-place root
|
|
3387
|
+
* @param before the root's nodes, collected before the walk
|
|
3388
|
+
*/
|
|
3389
|
+
const _sanitizeUnvisitedNodes = function _sanitizeUnvisitedNodes(root, before) {
|
|
3390
|
+
const visited = IN_PLACE_VISITED;
|
|
3391
|
+
let original = null;
|
|
3392
|
+
const getOriginal = () => {
|
|
3393
|
+
if (!original) {
|
|
3394
|
+
original = setCreate();
|
|
3395
|
+
arrayForEach(before, (beforeNode) => {
|
|
3396
|
+
setAdd(original, beforeNode);
|
|
3397
|
+
});
|
|
3398
|
+
}
|
|
3399
|
+
return original;
|
|
3400
|
+
};
|
|
3401
|
+
for (let round = 0;; round++) {
|
|
3402
|
+
const live = _collectLiveNodes(root);
|
|
3403
|
+
const containers = [root];
|
|
3404
|
+
let pending = false;
|
|
3405
|
+
arrayForEach(live, (node) => {
|
|
3406
|
+
if (_readNodeType(node) === NODE_TYPE.documentFragment) arrayPush(containers, node);
|
|
3407
|
+
else if (!pending && !setHas(visited, node)) pending = setHas(getOriginal(), node);
|
|
3408
|
+
});
|
|
3409
|
+
if (!pending) return;
|
|
3410
|
+
if (round >= MAX_UNVISITED_ROUNDS) throw typeErrorCreate("the tree kept changing during in-place sanitization; refusing to return it");
|
|
3411
|
+
arrayForEach(containers, (container, index) => {
|
|
3412
|
+
_sanitizeUnvisitedIn(container, index > 0, root, getOriginal());
|
|
3413
|
+
});
|
|
3414
|
+
}
|
|
3415
|
+
};
|
|
3416
|
+
/**
|
|
3417
|
+
* One _sanitizeUnvisitedNodes pass over the root or an open shadow root.
|
|
3356
3418
|
*
|
|
3357
|
-
* @param
|
|
3419
|
+
* @param container the root or an open shadow root
|
|
3420
|
+
* @param inShadow whether container is a shadow root
|
|
3421
|
+
* @param root the in-place root
|
|
3422
|
+
* @param original the root's nodes collected before the walk, as a set
|
|
3423
|
+
*/
|
|
3424
|
+
const _sanitizeUnvisitedIn = function _sanitizeUnvisitedIn(container, inShadow, root, original) {
|
|
3425
|
+
const iterator = _createNodeIterator(container);
|
|
3426
|
+
let node;
|
|
3427
|
+
while (node = iterator.nextNode()) {
|
|
3428
|
+
if (!setHas(original, node) || setHas(IN_PLACE_VISITED, node)) continue;
|
|
3429
|
+
if (inShadow) _executeHooks(hooks.uponSanitizeShadowNode, node, null);
|
|
3430
|
+
_sanitizeElements(node, root);
|
|
3431
|
+
_sanitizeAttributes(node, root);
|
|
3432
|
+
if (_isDocumentFragment(node.content)) _sanitizeShadowDOM2(node.content);
|
|
3433
|
+
}
|
|
3434
|
+
};
|
|
3435
|
+
/**
|
|
3436
|
+
* Records that _sanitizeElements processed `node`. No-op outside IN_PLACE.
|
|
3437
|
+
*
|
|
3438
|
+
* @param node the node being processed
|
|
3358
3439
|
*/
|
|
3440
|
+
const _markVisited = function _markVisited(node) {
|
|
3441
|
+
if (IN_PLACE_VISITED) setAdd(IN_PLACE_VISITED, node);
|
|
3442
|
+
};
|
|
3359
3443
|
/**
|
|
3360
|
-
*
|
|
3361
|
-
*
|
|
3362
|
-
*
|
|
3363
|
-
* everywhere except on <label>/<output>, and the whole policy is gated on
|
|
3364
|
-
* SAFE_FOR_XML (see the rationale block in _isValidAttribute).
|
|
3444
|
+
* Patch-linkage attributes (declarative partial updates): `patchsrc`
|
|
3445
|
+
* always, `for` everywhere except on <label> and <output>. Gated on
|
|
3446
|
+
* SAFE_FOR_XML. Shared by the IN_PLACE pre-pass and _isValidAttribute.
|
|
3365
3447
|
*
|
|
3366
3448
|
* @param lcName the transformCaseFunc'd attribute name
|
|
3367
3449
|
* @param lcTag the transformCaseFunc'd tag name of the carrying element
|
|
@@ -3372,17 +3454,26 @@ function createDOMPurify() {
|
|
|
3372
3454
|
if (lcName === "patchsrc") return true;
|
|
3373
3455
|
return lcName === "for" && lcTag !== "label" && lcTag !== "output";
|
|
3374
3456
|
};
|
|
3457
|
+
/**
|
|
3458
|
+
* IN_PLACE pre-pass: sever all patch linkage before the walk, so no patch
|
|
3459
|
+
* can fire mid-walk into a part of the tree the walker already passed.
|
|
3460
|
+
* Removes range markers (processing instructions, comments with markup)
|
|
3461
|
+
* and strips linkage attributes. It cannot undo a patch that already fired.
|
|
3462
|
+
*
|
|
3463
|
+
* TODO: if the shipped feature can patch through `for` on <label>/<output>,
|
|
3464
|
+
* drop that pair here too (see test/declarative-patch-probe.html).
|
|
3465
|
+
*
|
|
3466
|
+
* @param root the in-place root to sweep
|
|
3467
|
+
*/
|
|
3375
3468
|
const _neutralizePatchLinkage = function _neutralizePatchLinkage(root) {
|
|
3376
3469
|
if (!SAFE_FOR_XML) return;
|
|
3377
|
-
|
|
3378
|
-
while (stack.length > 0) {
|
|
3379
|
-
const node = stack.pop();
|
|
3470
|
+
_walkTree(root, (node) => {
|
|
3380
3471
|
const nodeType = _readNodeType(node);
|
|
3381
3472
|
if (nodeType === NODE_TYPE.processingInstruction || nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, node.data)) {
|
|
3382
3473
|
try {
|
|
3383
3474
|
remove(node);
|
|
3384
3475
|
} catch (_) {}
|
|
3385
|
-
|
|
3476
|
+
return false;
|
|
3386
3477
|
}
|
|
3387
3478
|
if (nodeType === NODE_TYPE.element) {
|
|
3388
3479
|
const element = node;
|
|
@@ -3392,9 +3483,8 @@ function createDOMPurify() {
|
|
|
3392
3483
|
if (element.hasAttribute && element.hasAttribute("for") && _isPatchLinkageAttribute("for", lcTag)) element.removeAttribute("for");
|
|
3393
3484
|
} catch (_) {}
|
|
3394
3485
|
}
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
}
|
|
3486
|
+
return true;
|
|
3487
|
+
});
|
|
3398
3488
|
};
|
|
3399
3489
|
/**
|
|
3400
3490
|
* _initDocument
|
|
@@ -3471,6 +3561,27 @@ function createDOMPurify() {
|
|
|
3471
3561
|
*/
|
|
3472
3562
|
const _scrubTemplateExpressions2 = function _scrubTemplateExpressions(node) {
|
|
3473
3563
|
var _node$querySelectorAl;
|
|
3564
|
+
_scrubOwnCharacterData(node);
|
|
3565
|
+
const templates = (_node$querySelectorAl = node.querySelectorAll) === null || _node$querySelectorAl === void 0 ? void 0 : _node$querySelectorAl.call(node, "template");
|
|
3566
|
+
if (templates) arrayForEach(templates, (tmpl) => {
|
|
3567
|
+
if (_isDocumentFragment(tmpl.content)) _scrubTemplateExpressions2(tmpl.content);
|
|
3568
|
+
});
|
|
3569
|
+
};
|
|
3570
|
+
/**
|
|
3571
|
+
* _scrubOwnCharacterData
|
|
3572
|
+
*
|
|
3573
|
+
* Non-recursive core of _scrubTemplateExpressions: normalize `node` and
|
|
3574
|
+
* strip template expressions from its own character data only. Does not
|
|
3575
|
+
* enter <template>.content or attached shadow roots (NodeIterator never
|
|
3576
|
+
* does). Used by _sanitizeShadowDOM, where every nested template content
|
|
3577
|
+
* and shadow root is already walked - and therefore scrubbed - by its own
|
|
3578
|
+
* recursive _sanitizeShadowDOM call; recursing here as well would rescrub
|
|
3579
|
+
* each nested fragment once per ancestor, which is quadratic in nesting
|
|
3580
|
+
* depth.
|
|
3581
|
+
*
|
|
3582
|
+
* @param node The root whose own character data should be scrubbed.
|
|
3583
|
+
*/
|
|
3584
|
+
const _scrubOwnCharacterData = function _scrubOwnCharacterData(node) {
|
|
3474
3585
|
node.normalize();
|
|
3475
3586
|
const doc = getOwnerDocument ? getOwnerDocument(node) : node.ownerDocument;
|
|
3476
3587
|
const walker = createNodeIterator.call(doc || node, node, NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION, null);
|
|
@@ -3479,10 +3590,6 @@ function createDOMPurify() {
|
|
|
3479
3590
|
currentNode.data = _stripTemplateExpressions(currentNode.data);
|
|
3480
3591
|
currentNode = walker.nextNode();
|
|
3481
3592
|
}
|
|
3482
|
-
const templates = (_node$querySelectorAl = node.querySelectorAll) === null || _node$querySelectorAl === void 0 ? void 0 : _node$querySelectorAl.call(node, "template");
|
|
3483
|
-
if (templates) arrayForEach(templates, (tmpl) => {
|
|
3484
|
-
if (_isDocumentFragment(tmpl.content)) _scrubTemplateExpressions2(tmpl.content);
|
|
3485
|
-
});
|
|
3486
3593
|
};
|
|
3487
3594
|
/**
|
|
3488
3595
|
* _isClobbered
|
|
@@ -3558,7 +3665,7 @@ function createDOMPurify() {
|
|
|
3558
3665
|
*/
|
|
3559
3666
|
const _isUnsafeNode = function _isUnsafeNode(currentNode, tagName) {
|
|
3560
3667
|
if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.innerHTML)) return true;
|
|
3561
|
-
if (SAFE_FOR_XML && currentNode
|
|
3668
|
+
if (SAFE_FOR_XML && LITERAL_TEXT_ELEMENTS[tagName] && _readNodeType(currentNode) === NODE_TYPE.element && _readNamespaceURI(currentNode) === HTML_NAMESPACE && (_isNode(currentNode.firstElementChild) || typeof currentNode.textContent === "string" && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent))) return true;
|
|
3562
3669
|
if (currentNode.nodeType === NODE_TYPE.processingInstruction) return true;
|
|
3563
3670
|
if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, currentNode.data)) return true;
|
|
3564
3671
|
return false;
|
|
@@ -3602,7 +3709,7 @@ function createDOMPurify() {
|
|
|
3602
3709
|
*/
|
|
3603
3710
|
const _sanitizeDisallowedNode = function _sanitizeDisallowedNode(currentNode, tagName, root) {
|
|
3604
3711
|
if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return false;
|
|
3605
|
-
if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
|
|
3712
|
+
if (KEEP_CONTENT && !FORBID_CONTENTS[tagName] && !FORBID_CONTENTS[stringToLowerCase(tagName)]) {
|
|
3606
3713
|
const parentNode = getParentNode(currentNode);
|
|
3607
3714
|
const childNodes = getChildNodes(currentNode);
|
|
3608
3715
|
if (childNodes && parentNode) {
|
|
@@ -3635,35 +3742,13 @@ function createDOMPurify() {
|
|
|
3635
3742
|
return set === defaultSet || set === setConfigSet ? clone(set) : set;
|
|
3636
3743
|
};
|
|
3637
3744
|
/**
|
|
3638
|
-
*
|
|
3639
|
-
*
|
|
3640
|
-
*
|
|
3641
|
-
* filtering). Per the cached, unclobberable parentNode getter the node is
|
|
3642
|
-
* genuinely out of the tree, so it can reach neither the serialized
|
|
3643
|
-
* output nor an IN_PLACE live tree; treat it as removed and stop
|
|
3644
|
-
* processing it. Without this guard, the unsafe-node / namespace checks
|
|
3645
|
-
* would call _forceRemove on a parentless node and hit the REPORT-3
|
|
3646
|
-
* fail-closed throw — which exists for nodes DOMPurify wants gone but
|
|
3647
|
-
* *cannot* detach (clobbered / parentless roots), the opposite of a node
|
|
3648
|
-
* that is already safely gone. The walk root is exempt: a detached
|
|
3649
|
-
* IN_PLACE root is legitimate input and must still be fully sanitized,
|
|
3650
|
-
* and a kill-decision on it must keep hitting the REPORT-3 throw.
|
|
3651
|
-
*
|
|
3652
|
-
* Nodes detached by hooks stay the hook's responsibility for placement:
|
|
3653
|
-
* they are not recorded in DOMPurify.removed, so the post-walk IN_PLACE
|
|
3654
|
-
* pass (which iterates DOMPurify.removed) does not reach them. But a
|
|
3655
|
-
* hook-detached subtree can still hold a queued resource-event handler -
|
|
3656
|
-
* e.g. an <img onload> that began loading when the caller built the live
|
|
3657
|
-
* tree - which fires in page scope after sanitize returns even though the
|
|
3658
|
-
* handler never reached the returned tree. That is the audit-5 F1 hazard,
|
|
3659
|
-
* and the documented node.remove() hook pattern walks straight into it.
|
|
3660
|
-
* So on the IN_PLACE path we neutralize the detached subtree inline,
|
|
3661
|
-
* stripping its non-allow-listed attributes before returning, exactly as
|
|
3662
|
-
* the post-walk pass does for _forceRemove'd subtrees.
|
|
3745
|
+
* A hook may have detached the node it was called for. If so, treat it as
|
|
3746
|
+
* removed and stop processing it; the walk root is exempt. On the IN_PLACE
|
|
3747
|
+
* path the detached subtree is neutralized right away.
|
|
3663
3748
|
*
|
|
3664
3749
|
* @param currentNode the node a hook may have detached
|
|
3665
3750
|
* @param root the current walk root
|
|
3666
|
-
* @return true if the node
|
|
3751
|
+
* @return true if the node was detached
|
|
3667
3752
|
*/
|
|
3668
3753
|
const _handleHookDetachedNode = function _handleHookDetachedNode(currentNode, root) {
|
|
3669
3754
|
if (currentNode === root || getParentNode(currentNode) !== null) return false;
|
|
@@ -3680,6 +3765,7 @@ function createDOMPurify() {
|
|
|
3680
3765
|
* @return true if node was killed, false if left alive
|
|
3681
3766
|
*/
|
|
3682
3767
|
const _sanitizeElements = function _sanitizeElements(currentNode, root) {
|
|
3768
|
+
_markVisited(currentNode);
|
|
3683
3769
|
_executeHooks(hooks.beforeSanitizeElements, currentNode, null);
|
|
3684
3770
|
if (_handleHookDetachedNode(currentNode, root)) return true;
|
|
3685
3771
|
if (_isClobbered(currentNode)) {
|
|
@@ -3823,6 +3909,22 @@ function createDOMPurify() {
|
|
|
3823
3909
|
}
|
|
3824
3910
|
};
|
|
3825
3911
|
/**
|
|
3912
|
+
* _isUnsafeAttributeValue
|
|
3913
|
+
*
|
|
3914
|
+
* Value-based attribute checks that the attribute walk applies before any
|
|
3915
|
+
* hook can force-keep an attribute, shared with the public
|
|
3916
|
+
* isValidAttribute() so that it never approves a value sanitize() would
|
|
3917
|
+
* strip.
|
|
3918
|
+
*
|
|
3919
|
+
* @param name the attribute name as found on the node (case preserved)
|
|
3920
|
+
* @param value the attribute value
|
|
3921
|
+
* @returns true if the attribute must be removed because of its value
|
|
3922
|
+
*/
|
|
3923
|
+
const _isUnsafeAttributeValue = function _isUnsafeAttributeValue(name, value) {
|
|
3924
|
+
if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) return true;
|
|
3925
|
+
return stringToLowerCase(name) === "attributename" && stringMatch(value, "href") !== null;
|
|
3926
|
+
};
|
|
3927
|
+
/**
|
|
3826
3928
|
* _sanitizeAttributes
|
|
3827
3929
|
*
|
|
3828
3930
|
* @protect attributes
|
|
@@ -3866,11 +3968,7 @@ function createDOMPurify() {
|
|
|
3866
3968
|
value = SANITIZE_NAMED_PROPS_PREFIX + value;
|
|
3867
3969
|
recreatedNamedProp = true;
|
|
3868
3970
|
}
|
|
3869
|
-
if (
|
|
3870
|
-
_removeAttribute(name, currentNode, attr);
|
|
3871
|
-
continue;
|
|
3872
|
-
}
|
|
3873
|
-
if (lcName === "attributename" && stringMatch(value, "href")) {
|
|
3971
|
+
if (_isUnsafeAttributeValue(name, value)) {
|
|
3874
3972
|
_removeAttribute(name, currentNode, attr);
|
|
3875
3973
|
continue;
|
|
3876
3974
|
}
|
|
@@ -3918,24 +4016,13 @@ function createDOMPurify() {
|
|
|
3918
4016
|
}
|
|
3919
4017
|
}
|
|
3920
4018
|
}
|
|
4019
|
+
if (SAFE_FOR_TEMPLATES) _scrubOwnCharacterData(fragment);
|
|
3921
4020
|
_executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
|
|
3922
4021
|
};
|
|
3923
4022
|
/**
|
|
3924
|
-
*
|
|
3925
|
-
*
|
|
3926
|
-
*
|
|
3927
|
-
* the existing _sanitizeShadowDOM pipeline. The default node iterator
|
|
3928
|
-
* does not descend into shadow trees, so nodes inside an attached
|
|
3929
|
-
* shadow root would otherwise be skipped entirely.
|
|
3930
|
-
*
|
|
3931
|
-
* Two real input paths put attached shadow roots in front of us:
|
|
3932
|
-
* 1. IN_PLACE on a DOM node that already has shadow roots attached.
|
|
3933
|
-
* 2. DOM-node input where importNode(dirty, true) deep-clones the
|
|
3934
|
-
* shadow root because it was created with `clonable: true`.
|
|
3935
|
-
*
|
|
3936
|
-
* This pass runs once, up front, so the main iteration loop (and the
|
|
3937
|
-
* existing _sanitizeShadowDOM template-content recursion) stay
|
|
3938
|
-
* untouched — string-input paths are not affected.
|
|
4023
|
+
* Sanitizes every attached shadow root under `root`, since the node
|
|
4024
|
+
* iterator does not enter shadow trees. Needed for IN_PLACE input and for
|
|
4025
|
+
* DOM input whose clonable shadow roots were copied by importNode().
|
|
3939
4026
|
*
|
|
3940
4027
|
* @param root the subtree root to walk for attached shadow roots
|
|
3941
4028
|
*/
|
|
@@ -4000,6 +4087,8 @@ function createDOMPurify() {
|
|
|
4000
4087
|
if (hooks.uponSanitizeAttribute.length > 0) ALLOWED_ATTR = clone(ALLOWED_ATTR);
|
|
4001
4088
|
DOMPurify.removed = [];
|
|
4002
4089
|
const inPlace = IN_PLACE && typeof dirty !== "string" && _isNode(dirty);
|
|
4090
|
+
let inPlaceNodes = [];
|
|
4091
|
+
const outerVisited = IN_PLACE_VISITED;
|
|
4003
4092
|
if (inPlace) {
|
|
4004
4093
|
_neutralizePatchLinkage(dirty);
|
|
4005
4094
|
const nn = _readNodeName(dirty);
|
|
@@ -4014,12 +4103,8 @@ function createDOMPurify() {
|
|
|
4014
4103
|
_neutralizeRoot(dirty);
|
|
4015
4104
|
throw typeErrorCreate("root node is clobbered and cannot be sanitized in-place");
|
|
4016
4105
|
}
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
} catch (error) {
|
|
4020
|
-
_neutralizeRoot(dirty);
|
|
4021
|
-
throw error;
|
|
4022
|
-
}
|
|
4106
|
+
inPlaceNodes = _collectLiveNodes(dirty);
|
|
4107
|
+
IN_PLACE_VISITED = setCreate();
|
|
4023
4108
|
} else if (_isNode(dirty)) {
|
|
4024
4109
|
body = _initDocument("<!---->");
|
|
4025
4110
|
importedNode = body.ownerDocument.importNode(dirty, true);
|
|
@@ -4035,30 +4120,25 @@ function createDOMPurify() {
|
|
|
4035
4120
|
if (body && FORCE_BODY) _forceRemove(body.firstChild);
|
|
4036
4121
|
const walkRoot = inPlace ? dirty : body;
|
|
4037
4122
|
try {
|
|
4123
|
+
if (inPlace) _sanitizeAttachedShadowRoots(dirty);
|
|
4038
4124
|
const nodeIterator = _createNodeIterator(walkRoot);
|
|
4039
4125
|
while (currentNode = nodeIterator.nextNode()) {
|
|
4040
4126
|
_sanitizeElements(currentNode, walkRoot);
|
|
4041
4127
|
_sanitizeAttributes(currentNode, walkRoot);
|
|
4042
4128
|
if (_isDocumentFragment(currentNode.content)) _sanitizeShadowDOM2(currentNode.content);
|
|
4043
4129
|
}
|
|
4130
|
+
if (inPlace) _sanitizeUnvisitedNodes(dirty, inPlaceNodes);
|
|
4044
4131
|
} catch (error) {
|
|
4045
4132
|
if (inPlace) {
|
|
4046
4133
|
_neutralizeRoot(dirty);
|
|
4047
|
-
|
|
4048
|
-
if (entry.element) _neutralizeSubtree(entry.element);
|
|
4049
|
-
});
|
|
4134
|
+
_neutralizeDiscarded(dirty, inPlaceNodes);
|
|
4050
4135
|
}
|
|
4051
4136
|
throw error;
|
|
4137
|
+
} finally {
|
|
4138
|
+
IN_PLACE_VISITED = outerVisited;
|
|
4052
4139
|
}
|
|
4053
4140
|
if (inPlace) {
|
|
4054
|
-
|
|
4055
|
-
arrayForEach(DOMPurify.removed, (entry) => {
|
|
4056
|
-
if (entry.element) {
|
|
4057
|
-
if (entry.element === dirty) rootWasRemoved = true;
|
|
4058
|
-
_neutralizeSubtree(entry.element);
|
|
4059
|
-
}
|
|
4060
|
-
});
|
|
4061
|
-
if (rootWasRemoved) throw typeErrorCreate("a node selected for removal could not be safely returned; refusing to sanitize in place");
|
|
4141
|
+
if (_neutralizeDiscarded(dirty, inPlaceNodes)) throw typeErrorCreate("a node selected for removal could not be safely returned; refusing to sanitize in place");
|
|
4062
4142
|
if (SAFE_FOR_TEMPLATES) _scrubTemplateExpressions2(dirty);
|
|
4063
4143
|
return dirty;
|
|
4064
4144
|
}
|
|
@@ -4095,6 +4175,7 @@ function createDOMPurify() {
|
|
|
4095
4175
|
if (!CONFIG) _parseConfig({});
|
|
4096
4176
|
const lcTag = transformCaseFunc(tag);
|
|
4097
4177
|
const lcName = transformCaseFunc(attr);
|
|
4178
|
+
if (typeof value === "string" && (_isUnsafeAttributeValue(attr, value) || !ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value))) return false;
|
|
4098
4179
|
return _isValidAttribute(lcTag, lcName, value);
|
|
4099
4180
|
};
|
|
4100
4181
|
DOMPurify.addHook = function(entryPoint, hookFunction) {
|
|
@@ -8714,7 +8795,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8714
8795
|
}, createSlots({ _: 2 }, [renderList($options.forwardedSlotEntries, ([slotName]) => {
|
|
8715
8796
|
return {
|
|
8716
8797
|
name: slotName,
|
|
8717
|
-
fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, slotName, normalizeProps(guardReactiveProps(
|
|
8798
|
+
fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, slotName, normalizeProps(guardReactiveProps({
|
|
8799
|
+
...slotProps ?? {},
|
|
8800
|
+
usedForAutoSizeCalculation: true
|
|
8801
|
+
})), void 0, true)])
|
|
8718
8802
|
};
|
|
8719
8803
|
})]), 1032, [
|
|
8720
8804
|
"data",
|
|
@@ -8725,7 +8809,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8725
8809
|
"onVnodeMounted"
|
|
8726
8810
|
])) : createCommentVNode("", true)], 64);
|
|
8727
8811
|
}
|
|
8728
|
-
var TableUIWithAutoSizeCalculation_default = /*#__PURE__*/ _plugin_vue_export_helper_default(TableUIWithAutoSizeCalculation_vue_vue_type_script_lang_default, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
8812
|
+
var TableUIWithAutoSizeCalculation_default = /*#__PURE__*/ _plugin_vue_export_helper_default(TableUIWithAutoSizeCalculation_vue_vue_type_script_lang_default, [["render", _sfc_render], ["__scopeId", "data-v-2d3b1862"]]);
|
|
8729
8813
|
//#endregion
|
|
8730
8814
|
export { PopoverContainer_default as PopoverContainer, TableActionBar_default as TableActionBar, TableUI_default as TableUI, TableUIWithAutoSizeCalculation_default as TableUIWithAutoSizeCalculation, columnSortText, columnTypes, constants_default as constants, defaultPageSize, getMissingValueMessage, isMissingValue, unpackObjectRepresentation, useButtonPopoverInteraction, useColumnSizes };
|
|
8731
8815
|
|