lightning-base-components 1.28.16-alpha → 1.28.17-alpha
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/metadata/raptor.json +37 -0
- package/package.json +17 -1
- package/scopedImports/@salesforce-label-LightningDynamicList.focusModeReminder.js +6 -0
- package/scopedImports/@salesforce-label-LightningDynamicList.focusModeSuggestion.js +6 -0
- package/src/lightning/baseCombobox/baseCombobox.d.ts +1 -1
- package/src/lightning/baseCombobox/baseCombobox.d.ts.map +1 -1
- package/src/lightning/baseCombobox/baseCombobox.js +3 -0
- package/src/lightning/button/button.css +4 -0
- package/src/lightning/buttonIcon/buttonIcon.css +4 -0
- package/src/lightning/buttonStateful/buttonStateful.css +4 -0
- package/src/lightning/datepicker/datepicker.html +1 -0
- package/src/lightning/dualListbox/dualListbox.d.ts +8 -1
- package/src/lightning/dualListbox/dualListbox.d.ts.map +1 -1
- package/src/lightning/dualListbox/dualListbox.js +28 -4
- package/src/lightning/dualListbox/dualListbox.lbc.resizereflow.css +27 -3
- package/src/lightning/features/gates/imports.d.ts +2 -0
- package/src/lightning/features/gates/imports.d.ts.map +1 -1
- package/src/lightning/features/gates/imports.js +2 -0
- package/src/lightning/features/types.d.ts +2 -0
- package/src/lightning/features/types.d.ts.map +1 -1
- package/src/lightning/fileDownload/resourceResolver.js +1 -1
- package/src/lightning/formattedRichText/formattedRichText.d.ts +6 -5
- package/src/lightning/formattedRichText/formattedRichText.d.ts.map +1 -1
- package/src/lightning/formattedRichText/formattedRichText.js +1 -7
- package/src/lightning/groupedCombobox/groupedCombobox.d.ts +1 -4
- package/src/lightning/groupedCombobox/groupedCombobox.d.ts.map +1 -1
- package/src/lightning/groupedCombobox/groupedCombobox.js +10 -12
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/hierarchy_table.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/inspector_brief.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/rcs_message.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/record_companion_agent.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/send_to_flow.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/shift_ui.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/table_code.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/templates.d.ts +70 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/templates.d.ts.map +1 -1
- package/src/lightning/iconSvgTemplates/buildTemplates/templates.js +36 -1
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/alt_lock.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/alt_unlock.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/conversation_catch_up.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/einstein_replies.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/hierarchy_table.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/in_app_messaging.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/inspector_brief.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/macros.html +1 -1
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/operations_plan.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/rcs_message.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/recent.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/recenter.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/recenter_alt.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/scheduling_policy.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/slack_canvas_content.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/slack_file.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/slack_image.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/slack_list.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/slack_list_item.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/slack_message.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/slack_microphone.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/slack_new_window.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/slack_video.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/table_checked.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/table_code.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/table_interpreter.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/table_sparkle.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/two_way.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/voice_mode.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/hierarchy_table.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/inspector_brief.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/rcs_message.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/record_companion_agent.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/send_to_flow.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/shift_ui.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/table_code.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/templates.d.ts +70 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/templates.d.ts.map +1 -1
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/templates.js +36 -1
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/alt_lock.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/alt_unlock.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/conversation_catch_up.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/einstein_replies.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/hierarchy_table.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/in_app_messaging.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/inspector_brief.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/macros.html +1 -1
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/operations_plan.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/rcs_message.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/recent.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/recenter.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/recenter_alt.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/scheduling_policy.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/slack_canvas_content.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/slack_file.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/slack_image.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/slack_list.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/slack_list_item.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/slack_message.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/slack_microphone.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/slack_new_window.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/slack_video.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/table_checked.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/table_code.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/table_interpreter.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/table_sparkle.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/two_way.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/voice_mode.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/hierarchy_table.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/inspector_brief.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/rcs_message.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/record_companion_agent.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/send_to_flow.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/shift_ui.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/table_code.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/templates.d.ts +14 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/templates.d.ts.map +1 -1
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/templates.js +8 -1
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/hierarchy_table.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/inspector_brief.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/rcs_message.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/record_companion_agent.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/send_to_flow.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/shift_ui.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/table_code.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/templates.d.ts +14 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/templates.d.ts.map +1 -1
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/templates.js +8 -1
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/templates.d.ts +56 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/templates.d.ts.map +1 -1
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/templates.js +29 -1
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/alt_lock.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/alt_unlock.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/conversation_catch_up.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/einstein_replies.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/hierarchy_table.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/in_app_messaging.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/inspector_brief.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/macros.html +1 -1
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/operations_plan.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/rcs_message.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/recent.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/recenter.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/recenter_alt.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/scheduling_policy.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/slack_canvas_content.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/slack_file.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/slack_image.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/slack_list.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/slack_list_item.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/slack_message.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/slack_microphone.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/slack_new_window.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/slack_video.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/table_checked.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/table_code.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/table_interpreter.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/table_sparkle.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/two_way.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/voice_mode.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/templates.d.ts +56 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/templates.d.ts.map +1 -1
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/templates.js +29 -1
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/alt_lock.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/alt_unlock.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/conversation_catch_up.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/einstein_replies.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/hierarchy_table.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/in_app_messaging.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/inspector_brief.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/macros.html +1 -1
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/operations_plan.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/rcs_message.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/recent.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/recenter.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/recenter_alt.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/scheduling_policy.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/slack_canvas_content.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/slack_file.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/slack_image.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/slack_list.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/slack_list_item.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/slack_message.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/slack_microphone.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/slack_new_window.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/slack_video.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/table_checked.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/table_code.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/table_interpreter.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/table_sparkle.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/two_way.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/voice_mode.html +7 -0
- package/src/lightning/iconUtils/iconColors.d.ts +7 -0
- package/src/lightning/iconUtils/iconColors.d.ts.map +1 -1
- package/src/lightning/iconUtils/iconColors.js +1 -1
- package/src/lightning/modalBase/modalBase.js +1 -1
- package/src/lightning/multiColumnSortingModal/multiColumnSortingModal.d.ts +1 -1
- package/src/lightning/multiColumnSortingModal/multiColumnSortingModal.d.ts.map +1 -1
- package/src/lightning/positionLibrary/util.d.ts.map +1 -1
- package/src/lightning/positionLibrary/util.js +3 -0
- package/src/lightning/primitiveDatatableIeditPanel/primitiveDatatableIeditPanel.js +1 -1
- package/src/lightning/purifyLib/purify.d.ts.map +1 -1
- package/src/lightning/purifyLib/purify.js +76 -25
- package/src/lightning/purifyLib/purifyLib.d.ts +3 -0
- package/src/lightning/purifyLib/purifyLib.d.ts.map +1 -1
- package/src/lightning/purifyLib/purifyLib.js +15 -0
- package/src/lightning/textarea/textarea.lbc.readonly.css +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"purify.d.ts","sourceRoot":"","sources":["../../../../../modules/lightning/purifyLib/purify.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"purify.d.ts","sourceRoot":"","sources":["../../../../../modules/lightning/purifyLib/purify.js"],"names":[],"mappings":";AAoTE;;;;;;;;;;;;;EAA+C;;;;;IAq5B/C,mDAkIC;IACD,yCAIC;IACD,6BAGC;IACD,oEAQC;IACD,2DAKC;IACD,6DAMC;IACD,4CAEC;IACD,gCAEC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
|
-
/*! @license DOMPurify 3.2
|
|
6
|
+
/*! @license DOMPurify 3.3.2 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.2/LICENSE */
|
|
7
7
|
const { entries, setPrototypeOf, isFrozen, getPrototypeOf, getOwnPropertyDescriptor } = Object;
|
|
8
8
|
let { freeze, seal, create } = Object;
|
|
9
9
|
let { apply, construct } = typeof Reflect !== 'undefined' && Reflect;
|
|
@@ -18,12 +18,18 @@ if (!seal) {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
if (!apply) {
|
|
21
|
-
apply = function apply(
|
|
22
|
-
|
|
21
|
+
apply = function apply(func, thisArg) {
|
|
22
|
+
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
23
|
+
args[_key - 2] = arguments[_key];
|
|
24
|
+
}
|
|
25
|
+
return func.apply(thisArg, args);
|
|
23
26
|
};
|
|
24
27
|
}
|
|
25
28
|
if (!construct) {
|
|
26
|
-
construct = function construct(Func
|
|
29
|
+
construct = function construct(Func) {
|
|
30
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
31
|
+
args[_key2 - 1] = arguments[_key2];
|
|
32
|
+
}
|
|
27
33
|
return new Func(...args);
|
|
28
34
|
};
|
|
29
35
|
}
|
|
@@ -46,18 +52,18 @@ function unapply(func) {
|
|
|
46
52
|
if (thisArg instanceof RegExp) {
|
|
47
53
|
thisArg.lastIndex = 0;
|
|
48
54
|
}
|
|
49
|
-
for (var
|
|
50
|
-
args[
|
|
55
|
+
for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
|
|
56
|
+
args[_key3 - 1] = arguments[_key3];
|
|
51
57
|
}
|
|
52
58
|
return apply(func, thisArg, args);
|
|
53
59
|
};
|
|
54
60
|
}
|
|
55
|
-
function unconstruct(
|
|
61
|
+
function unconstruct(Func) {
|
|
56
62
|
return function () {
|
|
57
|
-
for (var
|
|
58
|
-
args[
|
|
63
|
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
64
|
+
args[_key4] = arguments[_key4];
|
|
59
65
|
}
|
|
60
|
-
return construct(
|
|
66
|
+
return construct(Func, args);
|
|
61
67
|
};
|
|
62
68
|
}
|
|
63
69
|
function addToSet(set, array) {
|
|
@@ -126,15 +132,15 @@ function lookupGetter(object, prop) {
|
|
|
126
132
|
}
|
|
127
133
|
return fallbackValue;
|
|
128
134
|
}
|
|
129
|
-
const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);
|
|
130
|
-
const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
|
|
135
|
+
const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'search', 'section', 'select', 'shadow', 'slot', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);
|
|
136
|
+
const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'enterkeyhint', 'exportparts', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'inputmode', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'part', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
|
|
131
137
|
const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);
|
|
132
138
|
const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);
|
|
133
139
|
const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);
|
|
134
140
|
const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
|
|
135
141
|
const text = freeze(['#text']);
|
|
136
|
-
const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);
|
|
137
|
-
const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);
|
|
142
|
+
const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'exportparts', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inert', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'part', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'slot', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);
|
|
143
|
+
const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'mask-type', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);
|
|
138
144
|
const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);
|
|
139
145
|
const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
|
|
140
146
|
const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm);
|
|
@@ -218,7 +224,7 @@ const _createHooksMap = function _createHooksMap() {
|
|
|
218
224
|
function createDOMPurify() {
|
|
219
225
|
let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
|
|
220
226
|
const DOMPurify = root => createDOMPurify(root);
|
|
221
|
-
DOMPurify.version = '3.2
|
|
227
|
+
DOMPurify.version = '3.3.2';
|
|
222
228
|
DOMPurify.removed = [];
|
|
223
229
|
if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
|
|
224
230
|
DOMPurify.isSupported = false;
|
|
@@ -274,6 +280,20 @@ function createDOMPurify() {
|
|
|
274
280
|
}));
|
|
275
281
|
let FORBID_TAGS = null;
|
|
276
282
|
let FORBID_ATTR = null;
|
|
283
|
+
const EXTRA_ELEMENT_HANDLING = Object.seal(create(null, {
|
|
284
|
+
tagCheck: {
|
|
285
|
+
writable: true,
|
|
286
|
+
configurable: false,
|
|
287
|
+
enumerable: true,
|
|
288
|
+
value: null
|
|
289
|
+
},
|
|
290
|
+
attributeCheck: {
|
|
291
|
+
writable: true,
|
|
292
|
+
configurable: false,
|
|
293
|
+
enumerable: true,
|
|
294
|
+
value: null
|
|
295
|
+
}
|
|
296
|
+
}));
|
|
277
297
|
let ALLOW_ARIA_ATTR = true;
|
|
278
298
|
let ALLOW_DATA_ATTR = true;
|
|
279
299
|
let ALLOW_UNKNOWN_PROTOCOLS = false;
|
|
@@ -375,7 +395,7 @@ function createDOMPurify() {
|
|
|
375
395
|
}
|
|
376
396
|
if (USE_PROFILES) {
|
|
377
397
|
ALLOWED_TAGS = addToSet({}, text);
|
|
378
|
-
ALLOWED_ATTR =
|
|
398
|
+
ALLOWED_ATTR = create(null);
|
|
379
399
|
if (USE_PROFILES.html === true) {
|
|
380
400
|
addToSet(ALLOWED_TAGS, html$1);
|
|
381
401
|
addToSet(ALLOWED_ATTR, html);
|
|
@@ -396,17 +416,33 @@ function createDOMPurify() {
|
|
|
396
416
|
addToSet(ALLOWED_ATTR, xml);
|
|
397
417
|
}
|
|
398
418
|
}
|
|
419
|
+
if (!objectHasOwnProperty(cfg, 'ADD_TAGS')) {
|
|
420
|
+
EXTRA_ELEMENT_HANDLING.tagCheck = null;
|
|
421
|
+
}
|
|
422
|
+
if (!objectHasOwnProperty(cfg, 'ADD_ATTR')) {
|
|
423
|
+
EXTRA_ELEMENT_HANDLING.attributeCheck = null;
|
|
424
|
+
}
|
|
399
425
|
if (cfg.ADD_TAGS) {
|
|
400
|
-
if (
|
|
401
|
-
|
|
426
|
+
if (typeof cfg.ADD_TAGS === 'function') {
|
|
427
|
+
EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
|
|
428
|
+
}
|
|
429
|
+
else {
|
|
430
|
+
if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
|
|
431
|
+
ALLOWED_TAGS = clone(ALLOWED_TAGS);
|
|
432
|
+
}
|
|
433
|
+
addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
|
|
402
434
|
}
|
|
403
|
-
addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
|
|
404
435
|
}
|
|
405
436
|
if (cfg.ADD_ATTR) {
|
|
406
|
-
if (
|
|
407
|
-
|
|
437
|
+
if (typeof cfg.ADD_ATTR === 'function') {
|
|
438
|
+
EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;
|
|
439
|
+
}
|
|
440
|
+
else {
|
|
441
|
+
if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
|
|
442
|
+
ALLOWED_ATTR = clone(ALLOWED_ATTR);
|
|
443
|
+
}
|
|
444
|
+
addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
|
|
408
445
|
}
|
|
409
|
-
addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
|
|
410
446
|
}
|
|
411
447
|
if (cfg.ADD_URI_SAFE_ATTR) {
|
|
412
448
|
addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
|
|
@@ -417,6 +453,12 @@ function createDOMPurify() {
|
|
|
417
453
|
}
|
|
418
454
|
addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
|
|
419
455
|
}
|
|
456
|
+
if (cfg.ADD_FORBID_CONTENTS) {
|
|
457
|
+
if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
|
|
458
|
+
FORBID_CONTENTS = clone(FORBID_CONTENTS);
|
|
459
|
+
}
|
|
460
|
+
addToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);
|
|
461
|
+
}
|
|
420
462
|
if (KEEP_CONTENT) {
|
|
421
463
|
ALLOWED_TAGS['#text'] = true;
|
|
422
464
|
}
|
|
@@ -612,7 +654,7 @@ function createDOMPurify() {
|
|
|
612
654
|
_forceRemove(currentNode);
|
|
613
655
|
return true;
|
|
614
656
|
}
|
|
615
|
-
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
|
|
657
|
+
if (!(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName])) {
|
|
616
658
|
if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
|
|
617
659
|
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
|
|
618
660
|
return false;
|
|
@@ -660,6 +702,9 @@ function createDOMPurify() {
|
|
|
660
702
|
return false;
|
|
661
703
|
};
|
|
662
704
|
const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
|
|
705
|
+
if (FORBID_ATTR[lcName]) {
|
|
706
|
+
return false;
|
|
707
|
+
}
|
|
663
708
|
if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
|
|
664
709
|
return false;
|
|
665
710
|
}
|
|
@@ -667,8 +712,10 @@ function createDOMPurify() {
|
|
|
667
712
|
;
|
|
668
713
|
else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName))
|
|
669
714
|
;
|
|
715
|
+
else if (EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag))
|
|
716
|
+
;
|
|
670
717
|
else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
|
|
671
|
-
if (_isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) ||
|
|
718
|
+
if (_isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName, lcTag)) ||
|
|
672
719
|
lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value)))
|
|
673
720
|
;
|
|
674
721
|
else {
|
|
@@ -723,7 +770,11 @@ function createDOMPurify() {
|
|
|
723
770
|
_removeAttribute(name, currentNode);
|
|
724
771
|
value = SANITIZE_NAMED_PROPS_PREFIX + value;
|
|
725
772
|
}
|
|
726
|
-
if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value)) {
|
|
773
|
+
if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {
|
|
774
|
+
_removeAttribute(name, currentNode);
|
|
775
|
+
continue;
|
|
776
|
+
}
|
|
777
|
+
if (lcName === 'attributename' && stringMatch(value, 'href')) {
|
|
727
778
|
_removeAttribute(name, currentNode);
|
|
728
779
|
continue;
|
|
729
780
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"purifyLib.d.ts","sourceRoot":"","sources":["../../../../../modules/lightning/purifyLib/purifyLib.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"purifyLib.d.ts","sourceRoot":"","sources":["../../../../../modules/lightning/purifyLib/purifyLib.ts"],"names":[],"mappings":"AAGA,UAAU,cAAc;IAEpB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,IAAI,CAAC,EAAE;QACH,uBAAuB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;KAC/D,CAAC;CACL;AA4BD,MAAM,CAAC,OAAO,UAAU,YAAY,CAChC,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,MAAM,CAAC,EAAE,cAAc,GACxB,MAAM,CAeR"}
|
|
@@ -4,6 +4,21 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
import DOMPurify from './purify.js';
|
|
7
|
+
import { features } from 'lightning/features';
|
|
7
8
|
export default function sanitizeHTML(dirty, config) {
|
|
9
|
+
if (features.enableaftersanitizationhook) {
|
|
10
|
+
const hook = config?.hook?.afterSanitizeAttributes;
|
|
11
|
+
if (hook) {
|
|
12
|
+
DOMPurify.addHook('afterSanitizeAttributes', hook);
|
|
13
|
+
}
|
|
14
|
+
try {
|
|
15
|
+
return DOMPurify.sanitize(dirty, config);
|
|
16
|
+
}
|
|
17
|
+
finally {
|
|
18
|
+
if (hook) {
|
|
19
|
+
DOMPurify.removeHook('afterSanitizeAttributes', hook);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
8
23
|
return DOMPurify.sanitize(dirty, config);
|
|
9
24
|
}
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
|
|
167
167
|
.slds-form-element__static.fix-slds-form-element__static {
|
|
168
168
|
font-size: var(--slds-s-label-font-size, var(--slds-g-font-scale-neg-1));
|
|
169
|
-
font-weight: var(--slds-
|
|
169
|
+
font-weight: var(--slds-g-font-weight-4);
|
|
170
170
|
color: var(--slds-s-label-color, var(--slds-g-color-neutral-base-10));
|
|
171
171
|
}
|
|
172
172
|
|