@oat-sa/tao-core-ui 1.63.1 → 1.64.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/dist/actionbar.js +2 -109
- package/dist/animable/absorbable/absorbable.js +2 -109
- package/dist/animable/pulsable/pulsable.js +2 -109
- package/dist/badge/badge.js +2 -109
- package/dist/breadcrumbs.js +2 -109
- package/dist/bulkActionPopup.js +2 -108
- package/dist/button.js +2 -110
- package/dist/cascadingComboBox.js +2 -108
- package/dist/class/selector.js +2 -108
- package/dist/component/windowed.js +2 -108
- package/dist/component.js +2 -109
- package/dist/contextualPopup.js +2 -109
- package/dist/dashboard.js +2 -108
- package/dist/datalist.js +2 -108
- package/dist/datatable.js +3 -108
- package/dist/dateRange/dateRange.js +2 -108
- package/dist/datetime/picker.js +2 -108
- package/dist/deleter.js +2 -108
- package/dist/destination/selector.js +2 -108
- package/dist/dialog/confirmDelete.js +2 -108
- package/dist/dialog.js +2 -108
- package/dist/documentViewer/providers/pdfViewer/fallback/viewer.js +2 -110
- package/dist/documentViewer/providers/pdfViewer/pdfjs/findBar.js +2 -109
- package/dist/documentViewer/providers/pdfViewer/pdfjs/pageView.js +2 -110
- package/dist/documentViewer/providers/pdfViewer/pdfjs/searchEngine.js +2 -109
- package/dist/documentViewer/providers/pdfViewer/pdfjs/viewer.js +2 -109
- package/dist/documentViewer/providers/pdfViewer.js +2 -109
- package/dist/documentViewer.js +2 -109
- package/dist/dropdown.js +2 -109
- package/dist/dynamicComponent.js +2 -109
- package/dist/feedback.js +2 -109
- package/dist/figure/FigureStateActive.js +2 -108
- package/dist/filter.js +2 -108
- package/dist/form/dropdownForm.js +2 -108
- package/dist/form/form.js +2 -109
- package/dist/form/validator/renderer.js +2 -109
- package/dist/form/widget/providers/checkBox.js +2 -108
- package/dist/form/widget/providers/comboBox.js +2 -110
- package/dist/form/widget/providers/hidden.js +2 -110
- package/dist/form/widget/providers/hiddenBox.js +2 -108
- package/dist/form/widget/providers/radioBox.js +2 -110
- package/dist/form/widget/providers/textArea.js +2 -110
- package/dist/form/widget/widget.js +2 -108
- package/dist/generis/form/form.js +2 -108
- package/dist/generis/validator/validator.js +2 -109
- package/dist/generis/widget/checkBox/checkBox.js +2 -108
- package/dist/generis/widget/comboBox/comboBox.js +2 -109
- package/dist/generis/widget/hiddenBox/hiddenBox.js +2 -109
- package/dist/generis/widget/textBox/textBox.js +2 -109
- package/dist/generis/widget/widget.js +2 -108
- package/dist/groupedComboBox.js +2 -108
- package/dist/itemButtonList.js +2 -110
- package/dist/listbox.js +2 -108
- package/dist/loadingButton/loadingButton.js +2 -109
- package/dist/lock.js +2 -108
- package/dist/login/login.js +2 -108
- package/dist/maths/calculator/basicCalculator.js +2 -109
- package/dist/maths/calculator/core/board.js +2 -108
- package/dist/maths/calculator/core/expression.js +2 -109
- package/dist/maths/calculator/core/labels.js +2 -109
- package/dist/maths/calculator/plugins/keyboard/templateKeyboard/templateKeyboard.js +2 -109
- package/dist/maths/calculator/plugins/screen/simpleScreen/simpleScreen.js +2 -109
- package/dist/maths/calculator/scientificCalculator.js +2 -108
- package/dist/mediaEditor/mediaEditorComponent.js +2 -109
- package/dist/mediaEditor/plugins/mediaAlignment/mediaAlignmentComponent.js +2 -109
- package/dist/mediaEditor/plugins/mediaDimension/mediaDimensionComponent.js +2 -109
- package/dist/mediaplayer/players/html5.js +2 -110
- package/dist/mediaplayer/players/youtube.js +2 -110
- package/dist/mediaplayer.js +2 -109
- package/dist/mediasizer.js +2 -109
- package/dist/pageSizeSelector.js +2 -109
- package/dist/pagination/providers/pages.js +2 -109
- package/dist/pagination/providers/simple.js +2 -110
- package/dist/propertySelector/propertySelector.js +2 -110
- package/dist/report.js +2 -109
- package/dist/resource/filters.js +2 -108
- package/dist/resource/list.js +29 -119
- package/dist/resource/selector.js +2 -108
- package/dist/resource/tree.js +29 -119
- package/dist/resourcemgr/fileBrowser.js +478 -585
- package/dist/resourcemgr/fileSelector.js +2 -108
- package/dist/resourcemgr.js +2 -109
- package/dist/searchModal/advancedSearch.js +2 -109
- package/dist/searchModal.js +16 -107
- package/dist/switch/switch.js +2 -108
- package/dist/tabs.js +2 -109
- package/dist/taskQueue/status.js +2 -108
- package/dist/taskQueue/table.js +2 -108
- package/dist/taskQueueButton/taskable.js +2 -108
- package/dist/taskQueueButton/treeButton.js +2 -109
- package/dist/tooltip.js +2 -109
- package/dist/tristateCheckboxGroup.js +2 -108
- package/dist/uploader.js +2 -108
- package/package.json +2 -2
- package/scss/.DS_Store +0 -0
- package/scss/ckeditor/.DS_Store +0 -0
- package/scss/ckeditor/skins/.DS_Store +0 -0
- package/scss/ckeditor/skins/tao/.DS_Store +0 -0
- package/scss/ckeditor/skins/tao/scss/.DS_Store +0 -0
- package/scss/font/.DS_Store +0 -0
- package/scss/inc/.DS_Store +0 -0
package/dist/resource/tree.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(['jquery', 'lodash', 'ui/component', 'ui/resource/selectable', 'ui/hider', 'handlebars', '
|
|
1
|
+
define(['jquery', 'lodash', 'ui/component', 'ui/resource/selectable', 'ui/hider', 'handlebars', 'lib/handlebars/helpers'], function ($$1, _, component, selectable, hider, Handlebars, Helpers0) { 'use strict';
|
|
2
2
|
|
|
3
3
|
$$1 = $$1 && Object.prototype.hasOwnProperty.call($$1, 'default') ? $$1['default'] : $$1;
|
|
4
4
|
_ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;
|
|
@@ -6,114 +6,7 @@ define(['jquery', 'lodash', 'ui/component', 'ui/resource/selectable', 'ui/hider'
|
|
|
6
6
|
selectable = selectable && Object.prototype.hasOwnProperty.call(selectable, 'default') ? selectable['default'] : selectable;
|
|
7
7
|
hider = hider && Object.prototype.hasOwnProperty.call(hider, 'default') ? hider['default'] : hider;
|
|
8
8
|
Handlebars = Handlebars && Object.prototype.hasOwnProperty.call(Handlebars, 'default') ? Handlebars['default'] : Handlebars;
|
|
9
|
-
|
|
10
|
-
DOMPurify = DOMPurify && Object.prototype.hasOwnProperty.call(DOMPurify, 'default') ? DOMPurify['default'] : DOMPurify;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* This program is free software; you can redistribute it and/or
|
|
14
|
-
* modify it under the terms of the GNU General Public License
|
|
15
|
-
* as published by the Free Software Foundation; under version 2
|
|
16
|
-
* of the License (non-upgradable).
|
|
17
|
-
*
|
|
18
|
-
* This program is distributed in the hope that it will be useful,
|
|
19
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
20
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
21
|
-
* GNU General Public License for more details.
|
|
22
|
-
*
|
|
23
|
-
* You should have received a copy of the GNU General Public License
|
|
24
|
-
* along with this program; if not, write to the Free Software
|
|
25
|
-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
26
|
-
*
|
|
27
|
-
* Copyright (c) 2013-2019 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*/
|
|
31
|
-
function Helpers0 (hb) {
|
|
32
|
-
//register a i18n helper
|
|
33
|
-
hb.registerHelper('__', function (key) {
|
|
34
|
-
return __(key);
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Register dompurify helper
|
|
39
|
-
*
|
|
40
|
-
* https://github.com/cure53/DOMPurify
|
|
41
|
-
* with config SAFE_FOR_TEMPLATES: true
|
|
42
|
-
* to make output safe for template systems
|
|
43
|
-
*/
|
|
44
|
-
hb.registerHelper('dompurify', function (context) {
|
|
45
|
-
return DOMPurify.sanitize(context);
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Register join helper
|
|
50
|
-
*
|
|
51
|
-
* Example :
|
|
52
|
-
* var values = {a:v1, b:v2, c:v3};
|
|
53
|
-
* Using {{{join attributes '=' ' ' '"'}}} will return : a="v1" b="v2" c="v3"
|
|
54
|
-
* Using {{{join values null ' or ' '*'}}} will return : *v1* or *v2* or *v3*
|
|
55
|
-
*/
|
|
56
|
-
hb.registerHelper('join', function (arr, keyValueGlue, fragmentGlue, wrapper) {
|
|
57
|
-
var fragments = [];
|
|
58
|
-
keyValueGlue = typeof keyValueGlue === 'string' ? keyValueGlue : undefined;
|
|
59
|
-
fragmentGlue = typeof fragmentGlue === 'string' ? fragmentGlue : ' ';
|
|
60
|
-
wrapper = typeof wrapper === 'string' ? wrapper : '"';
|
|
61
|
-
_.forIn(arr, function (value, key) {
|
|
62
|
-
var fragment = '';
|
|
63
|
-
if (value !== null || value !== undefined) {
|
|
64
|
-
if (typeof value === 'boolean') {
|
|
65
|
-
value = value ? 'true' : 'false';
|
|
66
|
-
} else if (typeof value === 'object') {
|
|
67
|
-
value = _.values(value).join(' ');
|
|
68
|
-
}
|
|
69
|
-
} else {
|
|
70
|
-
value = '';
|
|
71
|
-
}
|
|
72
|
-
if (keyValueGlue !== undefined) {
|
|
73
|
-
fragment += key + keyValueGlue;
|
|
74
|
-
}
|
|
75
|
-
fragment += wrapper + value + wrapper;
|
|
76
|
-
fragments.push(fragment);
|
|
77
|
-
});
|
|
78
|
-
return fragments.join(fragmentGlue);
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
//register a classic "for loop" helper
|
|
82
|
-
//it also adds a local variable "i" as the index in each iteration loop
|
|
83
|
-
hb.registerHelper('for', function (startIndex, stopIndex, increment, options) {
|
|
84
|
-
var ret = '';
|
|
85
|
-
startIndex = parseInt(startIndex);
|
|
86
|
-
stopIndex = parseInt(stopIndex);
|
|
87
|
-
increment = parseInt(increment);
|
|
88
|
-
for (var i = startIndex; i < stopIndex; i += increment) {
|
|
89
|
-
ret += options.fn(_.extend({}, this, {
|
|
90
|
-
i: i
|
|
91
|
-
}));
|
|
92
|
-
}
|
|
93
|
-
return ret;
|
|
94
|
-
});
|
|
95
|
-
hb.registerHelper('equal', function (var1, var2, options) {
|
|
96
|
-
if (var1 == var2) {
|
|
97
|
-
return options.fn(this);
|
|
98
|
-
} else {
|
|
99
|
-
return options.inverse(this);
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
// register a "get property" helper
|
|
104
|
-
// it gets the named property from the provided context
|
|
105
|
-
hb.registerHelper('property', function (name, context) {
|
|
106
|
-
return context[name] || '';
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
// register an 'includes' helper
|
|
110
|
-
// it checks if value is in array
|
|
111
|
-
hb.registerHelper('includes', function (haystack, needle, options) {
|
|
112
|
-
if (_.contains(haystack, needle)) {
|
|
113
|
-
return options.fn(this);
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
}
|
|
9
|
+
Helpers0 = Helpers0 && Object.prototype.hasOwnProperty.call(Helpers0, 'default') ? Helpers0['default'] : Helpers0;
|
|
117
10
|
|
|
118
11
|
if (!Helpers0.__initialized) {
|
|
119
12
|
Helpers0(Handlebars);
|
|
@@ -261,7 +154,7 @@ define(['jquery', 'lodash', 'ui/component', 'ui/resource/selectable', 'ui/hider'
|
|
|
261
154
|
return (asString || true) ? html : $(html);
|
|
262
155
|
}
|
|
263
156
|
|
|
264
|
-
/*! @license DOMPurify 2.4.
|
|
157
|
+
/*! @license DOMPurify 2.4.1 | (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.1/LICENSE */
|
|
265
158
|
|
|
266
159
|
function _typeof(obj) {
|
|
267
160
|
"@babel/helpers - typeof";
|
|
@@ -366,6 +259,7 @@ define(['jquery', 'lodash', 'ui/component', 'ui/resource/selectable', 'ui/hider'
|
|
|
366
259
|
var arrayPop = unapply(Array.prototype.pop);
|
|
367
260
|
var arrayPush = unapply(Array.prototype.push);
|
|
368
261
|
var stringToLowerCase = unapply(String.prototype.toLowerCase);
|
|
262
|
+
var stringToString = unapply(String.prototype.toString);
|
|
369
263
|
var stringMatch = unapply(String.prototype.match);
|
|
370
264
|
var stringReplace = unapply(String.prototype.replace);
|
|
371
265
|
var stringIndexOf = unapply(String.prototype.indexOf);
|
|
@@ -472,6 +366,7 @@ define(['jquery', 'lodash', 'ui/component', 'ui/resource/selectable', 'ui/hider'
|
|
|
472
366
|
var MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
|
|
473
367
|
|
|
474
368
|
var ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
|
|
369
|
+
var TMPLIT_EXPR = seal(/\${[\w\W]*}/gm);
|
|
475
370
|
var DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/); // eslint-disable-line no-useless-escape
|
|
476
371
|
|
|
477
372
|
var ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
|
|
@@ -536,7 +431,7 @@ define(['jquery', 'lodash', 'ui/component', 'ui/resource/selectable', 'ui/hider'
|
|
|
536
431
|
* if DOMPurify is up to date or not
|
|
537
432
|
*/
|
|
538
433
|
|
|
539
|
-
DOMPurify.version = '2.4.
|
|
434
|
+
DOMPurify.version = '2.4.1';
|
|
540
435
|
/**
|
|
541
436
|
* Array of elements that DOMPurify removed during sanitation.
|
|
542
437
|
* Empty if nothing was removed.
|
|
@@ -598,6 +493,7 @@ define(['jquery', 'lodash', 'ui/component', 'ui/resource/selectable', 'ui/hider'
|
|
|
598
493
|
DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && typeof implementation.createHTMLDocument !== 'undefined' && documentMode !== 9;
|
|
599
494
|
var MUSTACHE_EXPR$1 = MUSTACHE_EXPR,
|
|
600
495
|
ERB_EXPR$1 = ERB_EXPR,
|
|
496
|
+
TMPLIT_EXPR$1 = TMPLIT_EXPR,
|
|
601
497
|
DATA_ATTR$1 = DATA_ATTR,
|
|
602
498
|
ARIA_ATTR$1 = ARIA_ATTR,
|
|
603
499
|
IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA,
|
|
@@ -737,6 +633,10 @@ define(['jquery', 'lodash', 'ui/component', 'ui/resource/selectable', 'ui/hider'
|
|
|
737
633
|
|
|
738
634
|
var NAMESPACE = HTML_NAMESPACE;
|
|
739
635
|
var IS_EMPTY_INPUT = false;
|
|
636
|
+
/* Allowed XHTML+XML namespaces */
|
|
637
|
+
|
|
638
|
+
var ALLOWED_NAMESPACES = null;
|
|
639
|
+
var DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
|
|
740
640
|
/* Parsing of strict XHTML documents */
|
|
741
641
|
|
|
742
642
|
var PARSER_MEDIA_TYPE;
|
|
@@ -777,13 +677,12 @@ define(['jquery', 'lodash', 'ui/component', 'ui/resource/selectable', 'ui/hider'
|
|
|
777
677
|
// eslint-disable-next-line unicorn/prefer-includes
|
|
778
678
|
SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE; // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
|
|
779
679
|
|
|
780
|
-
transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ?
|
|
781
|
-
return x;
|
|
782
|
-
} : stringToLowerCase;
|
|
680
|
+
transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;
|
|
783
681
|
/* Set configuration parameters */
|
|
784
682
|
|
|
785
683
|
ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
|
|
786
684
|
ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
|
|
685
|
+
ALLOWED_NAMESPACES = 'ALLOWED_NAMESPACES' in cfg ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
|
|
787
686
|
URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES),
|
|
788
687
|
// eslint-disable-line indent
|
|
789
688
|
cfg.ADD_URI_SAFE_ATTR,
|
|
@@ -947,19 +846,22 @@ define(['jquery', 'lodash', 'ui/component', 'ui/resource/selectable', 'ui/hider'
|
|
|
947
846
|
|
|
948
847
|
if (!parent || !parent.tagName) {
|
|
949
848
|
parent = {
|
|
950
|
-
namespaceURI:
|
|
849
|
+
namespaceURI: NAMESPACE,
|
|
951
850
|
tagName: 'template'
|
|
952
851
|
};
|
|
953
852
|
}
|
|
954
853
|
var tagName = stringToLowerCase(element.tagName);
|
|
955
854
|
var parentTagName = stringToLowerCase(parent.tagName);
|
|
855
|
+
if (!ALLOWED_NAMESPACES[element.namespaceURI]) {
|
|
856
|
+
return false;
|
|
857
|
+
}
|
|
956
858
|
if (element.namespaceURI === SVG_NAMESPACE) {
|
|
957
859
|
// The only way to switch from HTML namespace to SVG
|
|
958
860
|
// is via <svg>. If it happens via any other tag, then
|
|
959
861
|
// it should be killed.
|
|
960
862
|
if (parent.namespaceURI === HTML_NAMESPACE) {
|
|
961
863
|
return tagName === 'svg';
|
|
962
|
-
} // The only way to switch from MathML to SVG is via
|
|
864
|
+
} // The only way to switch from MathML to SVG is via`
|
|
963
865
|
// svg if parent is either <annotation-xml> or MathML
|
|
964
866
|
// text integration points.
|
|
965
867
|
|
|
@@ -999,9 +901,14 @@ define(['jquery', 'lodash', 'ui/component', 'ui/resource/selectable', 'ui/hider'
|
|
|
999
901
|
// or SVG and should never appear in HTML namespace
|
|
1000
902
|
|
|
1001
903
|
return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
|
|
904
|
+
} // For XHTML and XML documents that support custom namespaces
|
|
905
|
+
|
|
906
|
+
if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {
|
|
907
|
+
return true;
|
|
1002
908
|
} // The code should never reach this place (this means
|
|
1003
909
|
// that the element somehow got namespace that is not
|
|
1004
|
-
// HTML, SVG
|
|
910
|
+
// HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).
|
|
911
|
+
// Return false just in case.
|
|
1005
912
|
|
|
1006
913
|
return false;
|
|
1007
914
|
};
|
|
@@ -1077,7 +984,7 @@ define(['jquery', 'lodash', 'ui/component', 'ui/resource/selectable', 'ui/hider'
|
|
|
1077
984
|
var matches = stringMatch(dirty, /^[\r\n\t ]+/);
|
|
1078
985
|
leadingWhitespace = matches && matches[0];
|
|
1079
986
|
}
|
|
1080
|
-
if (PARSER_MEDIA_TYPE === 'application/xhtml+xml') {
|
|
987
|
+
if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {
|
|
1081
988
|
// Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)
|
|
1082
989
|
dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + '</body></html>';
|
|
1083
990
|
}
|
|
@@ -1132,7 +1039,7 @@ define(['jquery', 'lodash', 'ui/component', 'ui/resource/selectable', 'ui/hider'
|
|
|
1132
1039
|
*/
|
|
1133
1040
|
|
|
1134
1041
|
var _isClobbered = function _isClobbered(elm) {
|
|
1135
|
-
return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function');
|
|
1042
|
+
return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function');
|
|
1136
1043
|
};
|
|
1137
1044
|
/**
|
|
1138
1045
|
* _isNode
|
|
@@ -1250,6 +1157,7 @@ define(['jquery', 'lodash', 'ui/component', 'ui/resource/selectable', 'ui/hider'
|
|
|
1250
1157
|
content = currentNode.textContent;
|
|
1251
1158
|
content = stringReplace(content, MUSTACHE_EXPR$1, ' ');
|
|
1252
1159
|
content = stringReplace(content, ERB_EXPR$1, ' ');
|
|
1160
|
+
content = stringReplace(content, TMPLIT_EXPR$1, ' ');
|
|
1253
1161
|
if (currentNode.textContent !== content) {
|
|
1254
1162
|
arrayPush(DOMPurify.removed, {
|
|
1255
1163
|
element: currentNode.cloneNode()
|
|
@@ -1383,6 +1291,7 @@ define(['jquery', 'lodash', 'ui/component', 'ui/resource/selectable', 'ui/hider'
|
|
|
1383
1291
|
if (SAFE_FOR_TEMPLATES) {
|
|
1384
1292
|
value = stringReplace(value, MUSTACHE_EXPR$1, ' ');
|
|
1385
1293
|
value = stringReplace(value, ERB_EXPR$1, ' ');
|
|
1294
|
+
value = stringReplace(value, TMPLIT_EXPR$1, ' ');
|
|
1386
1295
|
}
|
|
1387
1296
|
/* Is `value` valid for this attribute? */
|
|
1388
1297
|
|
|
@@ -1635,6 +1544,7 @@ define(['jquery', 'lodash', 'ui/component', 'ui/resource/selectable', 'ui/hider'
|
|
|
1635
1544
|
if (SAFE_FOR_TEMPLATES) {
|
|
1636
1545
|
serializedHTML = stringReplace(serializedHTML, MUSTACHE_EXPR$1, ' ');
|
|
1637
1546
|
serializedHTML = stringReplace(serializedHTML, ERB_EXPR$1, ' ');
|
|
1547
|
+
serializedHTML = stringReplace(serializedHTML, TMPLIT_EXPR$1, ' ');
|
|
1638
1548
|
}
|
|
1639
1549
|
return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
|
|
1640
1550
|
};
|