@sankhyalabs/ezui 7.1.9 → 7.1.11
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/cjs/ApplicationUtils-5cc05979.js.gz +0 -0
- package/dist/cjs/CSSVarsUtils-f20973d1.js.gz +0 -0
- package/dist/cjs/CheckMode-ecb90b87.js.gz +0 -0
- package/dist/cjs/DialogType-2114c337.js.gz +0 -0
- package/dist/cjs/EzScrollDirection-b2c99895.js.gz +0 -0
- package/dist/cjs/FocusResolver-885f2173.js.gz +0 -0
- package/dist/cjs/FormLayout-18853e70.js.gz +0 -0
- package/dist/cjs/RichToolbarHelper-ea12328f.js.gz +0 -0
- package/dist/cjs/_commonjsHelpers-537d719a.js.gz +0 -0
- package/dist/cjs/app-globals-2fbe4b17.js.gz +0 -0
- package/dist/cjs/constants-72b7e05e.js.gz +0 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-alert-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-alert.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-application.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-avatar.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-badge.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-breadcrumb.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-button.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-calendar.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-card-item.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-chart.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-check.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-chip.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-classic-combo-box.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-classic-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-classic-text-area.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-collapsible-box.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-combo-box-list_4.cjs.entry.js +1 -1
- package/dist/cjs/ez-combo-box-list_4.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-combo-box.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-date-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-date-time-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-dialog.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-double-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-dropdown.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-empty-card.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-file-item.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-filter-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-form-view.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-form.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-grid-view.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-grid.cjs.entry.js +1 -1
- package/dist/cjs/ez-grid.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-guide-navigator.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-icon.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-link-builder_6.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-list-item.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-loading-bar.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-modal-container.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-modal.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-number-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-pagination.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-popover-core.cjs.entry.js +18 -2
- package/dist/cjs/ez-popover-core.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-popover-plus_3.cjs.entry.js +2 -0
- package/dist/cjs/ez-popover-plus_3.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-popover.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-popup.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-progress-bar.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-radio-button.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-rich-toolbar-item.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-scroller_2.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-search-plus.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-search-result-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-search.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-sidebar-navigator.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-skeleton.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-sortable-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-spinner.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-split-button.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-split-item.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-split-panel.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tabselector.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tag-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tag.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-text-area.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-text-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tile-medium.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tile.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-time-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-toast.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/ez-tooltip.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tree.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-underface.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-upload.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-view-stack.cjs.entry.js.gz +0 -0
- package/dist/cjs/ezListHelper-0d3970b4.js.gz +0 -0
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/ezui.cjs.js.gz +0 -0
- package/dist/cjs/filter-column.cjs.entry.js +7 -2
- package/dist/cjs/filter-column.cjs.entry.js.gz +0 -0
- package/dist/cjs/{floating-ui.dom.esm-f4d87617.js → floating-ui.dom.esm-f1e4e440.js} +93 -0
- package/dist/cjs/floating-ui.dom.esm-f1e4e440.js.gz +0 -0
- package/dist/cjs/index-1be40f19.js.gz +0 -0
- package/dist/cjs/index-a7b0c73d.js.gz +0 -0
- package/dist/cjs/index.cjs.js.gz +0 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js.gz +0 -0
- package/dist/cjs/{purify-ca9603eb.js → purify-5548aebb.js} +724 -262
- package/dist/cjs/purify-5548aebb.js.gz +0 -0
- package/dist/cjs/search-column-316e2c59.js.gz +0 -0
- package/dist/cjs/searchFormatters-b7e1ed1e.js.gz +0 -0
- package/dist/collection/components/ez-actions-button/ez-actions-button.css.gz +0 -0
- package/dist/collection/components/ez-actions-button/ez-actions-button.js.gz +0 -0
- package/dist/collection/components/ez-alert/ez-alert.css.gz +0 -0
- package/dist/collection/components/ez-alert/ez-alert.js.gz +0 -0
- package/dist/collection/components/ez-alert-list/ez-alert-list.css.gz +0 -0
- package/dist/collection/components/ez-alert-list/ez-alert-list.js.gz +0 -0
- package/dist/collection/components/ez-application/ez-application.css.gz +0 -0
- package/dist/collection/components/ez-application/ez-application.js.gz +0 -0
- package/dist/collection/components/ez-avatar/ez-avatar.css.gz +0 -0
- package/dist/collection/components/ez-avatar/ez-avatar.js.gz +0 -0
- package/dist/collection/components/ez-badge/enum/sizes.js.gz +0 -0
- package/dist/collection/components/ez-badge/ez-badge.css.gz +0 -0
- package/dist/collection/components/ez-badge/ez-badge.js.gz +0 -0
- package/dist/collection/components/ez-badge/interfaces/IPosition.js.gz +0 -0
- package/dist/collection/components/ez-breadcrumb/ez-breadcrumb.css.gz +0 -0
- package/dist/collection/components/ez-breadcrumb/ez-breadcrumb.js.gz +0 -0
- package/dist/collection/components/ez-breadcrumb/subcomponents/breadcrumb-item.js.gz +0 -0
- package/dist/collection/components/ez-button/ez-button.css.gz +0 -0
- package/dist/collection/components/ez-button/ez-button.js.gz +0 -0
- package/dist/collection/components/ez-calendar/ez-calendar.css.gz +0 -0
- package/dist/collection/components/ez-calendar/ez-calendar.js.gz +0 -0
- package/dist/collection/components/ez-card-item/ez-card-item.css.gz +0 -0
- package/dist/collection/components/ez-card-item/ez-card-item.js.gz +0 -0
- package/dist/collection/components/ez-chart/components/BarChart.js.gz +0 -0
- package/dist/collection/components/ez-chart/components/ColumnChart.js.gz +0 -0
- package/dist/collection/components/ez-chart/components/DonutChart.js.gz +0 -0
- package/dist/collection/components/ez-chart/components/LineChart.js.gz +0 -0
- package/dist/collection/components/ez-chart/components/PieChart.js.gz +0 -0
- package/dist/collection/components/ez-chart/components/index.js.gz +0 -0
- package/dist/collection/components/ez-chart/ez-chart.css.gz +0 -0
- package/dist/collection/components/ez-chart/ez-chart.js.gz +0 -0
- package/dist/collection/components/ez-chart/interfaces/ChartAxis.js.gz +0 -0
- package/dist/collection/components/ez-chart/interfaces/ChartContext.js.gz +0 -0
- package/dist/collection/components/ez-chart/interfaces/ChartOptions.js.gz +0 -0
- package/dist/collection/components/ez-chart/interfaces/ChartSerie.js.gz +0 -0
- package/dist/collection/components/ez-chart/interfaces/ChartStrategies.js.gz +0 -0
- package/dist/collection/components/ez-chart/interfaces/ChartType.js.gz +0 -0
- package/dist/collection/components/ez-chart/interfaces/ChartTypeValue.js.gz +0 -0
- package/dist/collection/components/ez-chart/interfaces/index.js.gz +0 -0
- package/dist/collection/components/ez-chart/test/mock-chart.js.gz +0 -0
- package/dist/collection/components/ez-chart/types/BaseHighChartsRender.js.gz +0 -0
- package/dist/collection/components/ez-check/CheckMode.js.gz +0 -0
- package/dist/collection/components/ez-check/ez-check.css.gz +0 -0
- package/dist/collection/components/ez-check/ez-check.js.gz +0 -0
- package/dist/collection/components/ez-chip/ez-chip.css.gz +0 -0
- package/dist/collection/components/ez-chip/ez-chip.js.gz +0 -0
- package/dist/collection/components/ez-classic-combo-box/ez-classic-combo-box.css.gz +0 -0
- package/dist/collection/components/ez-classic-combo-box/ez-classic-combo-box.js.gz +0 -0
- package/dist/collection/components/ez-classic-combo-box/interfaces/IOption.js.gz +0 -0
- package/dist/collection/components/ez-classic-input/ez-classic-input.css.gz +0 -0
- package/dist/collection/components/ez-classic-input/ez-classic-input.js.gz +0 -0
- package/dist/collection/components/ez-classic-input/interfaces/optionsSetFocus.js.gz +0 -0
- package/dist/collection/components/ez-classic-input/utils/maskFormatter.js.gz +0 -0
- package/dist/collection/components/ez-classic-text-area/ez-classic-text-area.css.gz +0 -0
- package/dist/collection/components/ez-classic-text-area/ez-classic-text-area.js.gz +0 -0
- package/dist/collection/components/ez-classic-text-area/interfaces/optionsSetFocus.js.gz +0 -0
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css.gz +0 -0
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js.gz +0 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.css.gz +0 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.js.gz +0 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.css.gz +0 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.js.gz +0 -0
- package/dist/collection/components/ez-date-input/ez-date-input.css.gz +0 -0
- package/dist/collection/components/ez-date-input/ez-date-input.js.gz +0 -0
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.css.gz +0 -0
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js.gz +0 -0
- package/dist/collection/components/ez-dialog/DialogType.js.gz +0 -0
- package/dist/collection/components/ez-dialog/ez-dialog.css.gz +0 -0
- package/dist/collection/components/ez-dialog/ez-dialog.js.gz +0 -0
- package/dist/collection/components/ez-double-list/doubleListHelper.js.gz +0 -0
- package/dist/collection/components/ez-double-list/ez-double-list.css.gz +0 -0
- package/dist/collection/components/ez-double-list/ez-double-list.js.gz +0 -0
- package/dist/collection/components/ez-dropdown/ez-dropdown.css.gz +0 -0
- package/dist/collection/components/ez-dropdown/ez-dropdown.js.gz +0 -0
- package/dist/collection/components/ez-dropdown/structure/DropdownItem.js.gz +0 -0
- package/dist/collection/components/ez-dropdown/structure/SubmenuControl.js.gz +0 -0
- package/dist/collection/components/ez-empty-card/ez-empty-card.css.gz +0 -0
- package/dist/collection/components/ez-empty-card/ez-empty-card.js.gz +0 -0
- package/dist/collection/components/ez-file-item/ez-file-item.css.gz +0 -0
- package/dist/collection/components/ez-file-item/ez-file-item.js.gz +0 -0
- package/dist/collection/components/ez-filter-input/ez-filter-input.css.gz +0 -0
- package/dist/collection/components/ez-filter-input/ez-filter-input.js.gz +0 -0
- package/dist/collection/components/ez-form/ez-form.css.gz +0 -0
- package/dist/collection/components/ez-form/ez-form.js.gz +0 -0
- package/dist/collection/components/ez-form/store/form.slice.js.gz +0 -0
- package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js.gz +0 -0
- package/dist/collection/components/ez-form-view/ez-form-view.css.gz +0 -0
- package/dist/collection/components/ez-form-view/ez-form-view.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/RichText.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInputPlus.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/interfaces/IFormViewField.js.gz +0 -0
- package/dist/collection/components/ez-form-view/interfaces/index.js.gz +0 -0
- package/dist/collection/components/ez-form-view/structure/index.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/EzGridController.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSourceInterceptor.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/cellRendererStatus.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/selectionHeader.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellEditorConstants.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellRenderConstants.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellRender.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/GridEditorUtils.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/IEditorMetadata.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/IUICellEditor.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/IUICellRender.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/SearchPlus.tpl.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/mock/Server.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/utils/buildLocaleText.js.gz +0 -0
- package/dist/collection/components/ez-grid/ez-grid.css.gz +0 -0
- package/dist/collection/components/ez-grid/ez-grid.js.gz +0 -0
- package/dist/collection/components/ez-grid/interfaces/IColumnFilter.js.gz +0 -0
- package/dist/collection/components/ez-grid/interfaces/ICustomFormatter.js.gz +0 -0
- package/dist/collection/components/ez-grid/interfaces/IGridMode.js.gz +0 -0
- package/dist/collection/components/ez-grid/interfaces/ISelection.js.gz +0 -0
- package/dist/collection/components/ez-grid/interfaces/ISelectionToastConfig.js.gz +0 -0
- package/dist/collection/components/ez-grid/interfaces/index.js.gz +0 -0
- package/dist/collection/components/ez-grid/subcomponents/filter-column.css +10 -0
- package/dist/collection/components/ez-grid/subcomponents/filter-column.css.gz +0 -0
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js +6 -1
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js.gz +0 -0
- package/dist/collection/components/ez-grid/subcomponents/selection-counter.js.gz +0 -0
- package/dist/collection/components/ez-grid/subcomponents/utils/selectionCounterUtils.js.gz +0 -0
- package/dist/collection/components/ez-grid/test/resources/gridDataUnit.js.gz +0 -0
- package/dist/collection/components/ez-grid/utils/ColumnFilterManager.js.gz +0 -0
- package/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource.js.gz +0 -0
- package/dist/collection/components/ez-grid/utils/index.js.gz +0 -0
- package/dist/collection/components/ez-grid-view/ez-grid-view.css.gz +0 -0
- package/dist/collection/components/ez-grid-view/ez-grid-view.js.gz +0 -0
- package/dist/collection/components/ez-guide-navigator/ez-guide-navigator.css.gz +0 -0
- package/dist/collection/components/ez-guide-navigator/ez-guide-navigator.js.gz +0 -0
- package/dist/collection/components/ez-guide-navigator/interfaces/IGuideItem.js.gz +0 -0
- package/dist/collection/components/ez-guide-navigator/interfaces/index.js.gz +0 -0
- package/dist/collection/components/ez-icon/ez-icon.css.gz +0 -0
- package/dist/collection/components/ez-icon/ez-icon.js.gz +0 -0
- package/dist/collection/components/ez-list/ez-list.css.gz +0 -0
- package/dist/collection/components/ez-list/ez-list.js.gz +0 -0
- package/dist/collection/components/ez-list/ezListHelper.js.gz +0 -0
- package/dist/collection/components/ez-list-item/ez-list-item.css.gz +0 -0
- package/dist/collection/components/ez-list-item/ez-list-item.js.gz +0 -0
- package/dist/collection/components/ez-loading-bar/ez-loading-bar.css.gz +0 -0
- package/dist/collection/components/ez-loading-bar/ez-loading-bar.js.gz +0 -0
- package/dist/collection/components/ez-modal/ez-modal.css.gz +0 -0
- package/dist/collection/components/ez-modal/ez-modal.js.gz +0 -0
- package/dist/collection/components/ez-modal-container/ez-modal-container.css.gz +0 -0
- package/dist/collection/components/ez-modal-container/ez-modal-container.js.gz +0 -0
- package/dist/collection/components/ez-modal-container/index.js.gz +0 -0
- package/dist/collection/components/ez-modal-container/modal-action.js.gz +0 -0
- package/dist/collection/components/ez-modal-container/modal-button-status.js.gz +0 -0
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.css +2 -1
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.css.gz +0 -0
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js.gz +0 -0
- package/dist/collection/components/ez-multi-selection-list/interfaces/IMultiSelectionListDataSource.js.gz +0 -0
- package/dist/collection/components/ez-multi-selection-list/interfaces/IMultiSelectionOption.js.gz +0 -0
- package/dist/collection/components/ez-multi-selection-list/interfaces/IStaticOptionsFetchConfig.js.gz +0 -0
- package/dist/collection/components/ez-multi-selection-list/subcomponents/multi-selection-box-message.css.gz +0 -0
- package/dist/collection/components/ez-multi-selection-list/subcomponents/multi-selection-box-message.js.gz +0 -0
- package/dist/collection/components/ez-number-input/ez-number-input.css.gz +0 -0
- package/dist/collection/components/ez-number-input/ez-number-input.js.gz +0 -0
- package/dist/collection/components/ez-pagination/ez-pagination.css.gz +0 -0
- package/dist/collection/components/ez-pagination/ez-pagination.js.gz +0 -0
- package/dist/collection/components/ez-popover/ez-popover.css.gz +0 -0
- package/dist/collection/components/ez-popover/ez-popover.js.gz +0 -0
- package/dist/collection/components/ez-popover-plus/ez-popover-plus.css.gz +0 -0
- package/dist/collection/components/ez-popover-plus/ez-popover-plus.js +20 -0
- package/dist/collection/components/ez-popover-plus/ez-popover-plus.js.gz +0 -0
- package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.css.gz +0 -0
- package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.js +36 -2
- package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.js.gz +0 -0
- package/dist/collection/components/ez-popup/ez-popup.css.gz +0 -0
- package/dist/collection/components/ez-popup/ez-popup.js.gz +0 -0
- package/dist/collection/components/ez-popup/interfaces/EzButtonProps.js.gz +0 -0
- package/dist/collection/components/ez-progress-bar/ez-progress-bar.css.gz +0 -0
- package/dist/collection/components/ez-progress-bar/ez-progress-bar.js.gz +0 -0
- package/dist/collection/components/ez-radio-button/ez-radio-button.css.gz +0 -0
- package/dist/collection/components/ez-radio-button/ez-radio-button.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-link-builder/ez-link-builder.css.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-link-builder/ez-link-builder.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-text.css.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-text.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/RichToolbarHelper.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-arrows/ez-rich-toolbar-arrows.css.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-arrows/ez-rich-toolbar-arrows.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-configs/ez-rich-toolbar-configs.css.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-configs/ez-rich-toolbar-configs.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-item/ez-rich-toolbar-item.css.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-item/ez-rich-toolbar-item.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-letters/ez-rich-toolbar-letters.css.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-letters/ez-rich-toolbar-letters.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar.css.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/ez-simple-image-uploader.css.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/ez-simple-image-uploader.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/test/resource/imageBase64.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/utils/fileToBase64.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/utils/formatBytes.js.gz +0 -0
- package/dist/collection/components/ez-scroller/EzScrollDirection.js.gz +0 -0
- package/dist/collection/components/ez-scroller/ez-scroller.css.gz +0 -0
- package/dist/collection/components/ez-scroller/ez-scroller.js.gz +0 -0
- package/dist/collection/components/ez-search/ez-search.css.gz +0 -0
- package/dist/collection/components/ez-search/ez-search.js.gz +0 -0
- package/dist/collection/components/ez-search/subcomponent/search-list/search-list.css.gz +0 -0
- package/dist/collection/components/ez-search/subcomponent/search-list/search-list.js.gz +0 -0
- package/dist/collection/components/ez-search/utils/searchFormatters.js.gz +0 -0
- package/dist/collection/components/ez-search-plus/ez-search-plus.css.gz +0 -0
- package/dist/collection/components/ez-search-plus/ez-search-plus.js.gz +0 -0
- package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.css.gz +0 -0
- package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.js.gz +0 -0
- package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.css.gz +0 -0
- package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.js.gz +0 -0
- package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.css.gz +0 -0
- package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.js.gz +0 -0
- package/dist/collection/components/ez-sidebar-navigator/interfaces/ModeMenuEnum.js.gz +0 -0
- package/dist/collection/components/ez-sidebar-navigator/interfaces/SizeMenuEnum.js.gz +0 -0
- package/dist/collection/components/ez-sidebar-navigator/interfaces/TypeMenuEnum.js.gz +0 -0
- package/dist/collection/components/ez-sidebar-navigator/interfaces/index.js.gz +0 -0
- package/dist/collection/components/ez-skeleton/ez-skeleton.constants.js.gz +0 -0
- package/dist/collection/components/ez-skeleton/ez-skeleton.css.gz +0 -0
- package/dist/collection/components/ez-skeleton/ez-skeleton.js.gz +0 -0
- package/dist/collection/components/ez-sortable-list/ez-sortable-list.css.gz +0 -0
- package/dist/collection/components/ez-sortable-list/ez-sortable-list.js.gz +0 -0
- package/dist/collection/components/ez-spinner/ez-spinner.css.gz +0 -0
- package/dist/collection/components/ez-spinner/ez-spinner.js.gz +0 -0
- package/dist/collection/components/ez-split-button/ez-split-button.css.gz +0 -0
- package/dist/collection/components/ez-split-button/ez-split-button.js.gz +0 -0
- package/dist/collection/components/ez-split-button/test/dropdownItems.js.gz +0 -0
- package/dist/collection/components/ez-split-panel/ez-split-panel.css.gz +0 -0
- package/dist/collection/components/ez-split-panel/ez-split-panel.js.gz +0 -0
- package/dist/collection/components/ez-split-panel/interfaces/IPanelSizeInfo.js.gz +0 -0
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css.gz +0 -0
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js.gz +0 -0
- package/dist/collection/components/ez-tabselector/ez-tabselector.css.gz +0 -0
- package/dist/collection/components/ez-tabselector/ez-tabselector.js.gz +0 -0
- package/dist/collection/components/ez-tag/ez-tag.css.gz +0 -0
- package/dist/collection/components/ez-tag/ez-tag.js.gz +0 -0
- package/dist/collection/components/ez-tag-input/ez-tag-input.css.gz +0 -0
- package/dist/collection/components/ez-tag-input/ez-tag-input.js.gz +0 -0
- package/dist/collection/components/ez-tag-input/interfaces/optionsSetFocus.js.gz +0 -0
- package/dist/collection/components/ez-text-area/ez-text-area.css.gz +0 -0
- package/dist/collection/components/ez-text-area/ez-text-area.js.gz +0 -0
- package/dist/collection/components/ez-text-edit/ez-text-edit.css.gz +0 -0
- package/dist/collection/components/ez-text-edit/ez-text-edit.js.gz +0 -0
- package/dist/collection/components/ez-text-input/ez-text-input.css.gz +0 -0
- package/dist/collection/components/ez-text-input/ez-text-input.js.gz +0 -0
- package/dist/collection/components/ez-tile/ez-tile.css.gz +0 -0
- package/dist/collection/components/ez-tile/ez-tile.js.gz +0 -0
- package/dist/collection/components/ez-tile-medium/ez-tile-medium.css.gz +0 -0
- package/dist/collection/components/ez-tile-medium/ez-tile-medium.js.gz +0 -0
- package/dist/collection/components/ez-time-input/ez-time-input.css.gz +0 -0
- package/dist/collection/components/ez-time-input/ez-time-input.js.gz +0 -0
- package/dist/collection/components/ez-toast/ez-toast.css.gz +0 -0
- package/dist/collection/components/ez-toast/ez-toast.js.gz +0 -0
- package/dist/collection/components/ez-tooltip/ez-tooltip.css.gz +0 -0
- package/dist/collection/components/ez-tooltip/ez-tooltip.js.gz +0 -0
- package/dist/collection/components/ez-tree/ez-tree.css.gz +0 -0
- package/dist/collection/components/ez-tree/ez-tree.js.gz +0 -0
- package/dist/collection/components/ez-tree/interfaces/ITree.js.gz +0 -0
- package/dist/collection/components/ez-tree/interfaces/ITreeItem.js.gz +0 -0
- package/dist/collection/components/ez-tree/interfaces/ITreeItemBadge.js.gz +0 -0
- package/dist/collection/components/ez-tree/subcomponents/DefaultIconResolver.js.gz +0 -0
- package/dist/collection/components/ez-tree/subcomponents/DefaultTooltipResolver.js.gz +0 -0
- package/dist/collection/components/ez-tree/subcomponents/TreeItem.js.gz +0 -0
- package/dist/collection/components/ez-tree/subcomponents/index.js.gz +0 -0
- package/dist/collection/components/ez-tree/types/Node.js.gz +0 -0
- package/dist/collection/components/ez-tree/types/Tree.js.gz +0 -0
- package/dist/collection/components/ez-tree/types/UpdateItemConfig.js.gz +0 -0
- package/dist/collection/components/ez-underface/ez-underface.css.gz +0 -0
- package/dist/collection/components/ez-underface/ez-underface.js.gz +0 -0
- package/dist/collection/components/ez-upload/RemoteFile.js.gz +0 -0
- package/dist/collection/components/ez-upload/ez-upload.css.gz +0 -0
- package/dist/collection/components/ez-upload/ez-upload.js.gz +0 -0
- package/dist/collection/components/ez-view-stack/ez-view-stack.css.gz +0 -0
- package/dist/collection/components/ez-view-stack/ez-view-stack.js.gz +0 -0
- package/dist/collection/global/app-init.js.gz +0 -0
- package/dist/collection/index.js.gz +0 -0
- package/dist/collection/servidor.js.gz +0 -0
- package/dist/collection/setupTests.js.gz +0 -0
- package/dist/collection/sw.js.gz +0 -0
- package/dist/collection/utils/ApplicationUtils.js.gz +0 -0
- package/dist/collection/utils/AssetsUtils.js.gz +0 -0
- package/dist/collection/utils/CSSVarsUtils.js.gz +0 -0
- package/dist/collection/utils/FocusResolver.js.gz +0 -0
- package/dist/collection/utils/ag-grid-license.js.gz +0 -0
- package/dist/collection/utils/constants.js.gz +0 -0
- package/dist/collection/utils/customEditor/interfaces/ICustomEditor.js.gz +0 -0
- package/dist/collection/utils/customEditor/interfaces/ICustomEditorInfo.js.gz +0 -0
- package/dist/collection/utils/customRender/interfaces/ICustomRender.js.gz +0 -0
- package/dist/collection/utils/customRender/interfaces/ICustomRenderInfo.js.gz +0 -0
- package/dist/collection/utils/form/DataBinder.js.gz +0 -0
- package/dist/collection/utils/form/FormMetadata.js.gz +0 -0
- package/dist/collection/utils/form/index.js.gz +0 -0
- package/dist/collection/utils/form/interfaces/FormLayout.js.gz +0 -0
- package/dist/collection/utils/form/interfaces/IDefaultConfig.js.gz +0 -0
- package/dist/collection/utils/form/interfaces/IFormCardConfig.js.gz +0 -0
- package/dist/collection/utils/form/interfaces/IFormConfig.js.gz +0 -0
- package/dist/collection/utils/form/interfaces/IFormSheetMetadata.js.gz +0 -0
- package/dist/collection/utils/form/interfaces/ISummaryField.js.gz +0 -0
- package/dist/collection/utils/form/interfaces/ITabConfig.js.gz +0 -0
- package/dist/collection/utils/form/interfaces/index.js.gz +0 -0
- package/dist/collection/utils/form/test/DataBinder.test.js.gz +0 -0
- package/dist/collection/utils/form/test/resources/metadataTest.js.gz +0 -0
- package/dist/collection/utils/i18n/elanguages.js.gz +0 -0
- package/dist/collection/utils/i18n/index.js.gz +0 -0
- package/dist/collection/utils/i18n/locales/en-us.js.gz +0 -0
- package/dist/collection/utils/i18n/locales/es-es.js.gz +0 -0
- package/dist/collection/utils/i18n/locales/pt-br.js.gz +0 -0
- package/dist/collection/utils/i18n/translations.js.gz +0 -0
- package/dist/collection/utils/index.js.gz +0 -0
- package/dist/collection/utils/interfaces/AbstractFieldMetadata.js.gz +0 -0
- package/dist/collection/utils/interfaces/IAction.js.gz +0 -0
- package/dist/collection/utils/interfaces/IFieldConfig.js.gz +0 -0
- package/dist/collection/utils/mock/ez-upload-mock.js.gz +0 -0
- package/dist/collection/utils/search/types.js.gz +0 -0
- package/dist/collection/utils/searchColumn/search-column.js.gz +0 -0
- package/dist/collection/utils/utils.js.gz +0 -0
- package/dist/collection/utils/validators/recordvalidator/IInvalidCells.js.gz +0 -0
- package/dist/collection/utils/validators/recordvalidator/IInvalidField.js.gz +0 -0
- package/dist/collection/utils/validators/recordvalidator/IRecordValidator.js.gz +0 -0
- package/dist/collection/utils/validators/recordvalidator/IValidationResult.js.gz +0 -0
- package/dist/collection/utils/validators/recordvalidator/IValidationSource.js.gz +0 -0
- package/dist/collection/utils/validators/recordvalidator/RecordValidationProcessor.js.gz +0 -0
- package/dist/custom-elements/index.js +845 -268
- package/dist/custom-elements/index.js.gz +0 -0
- package/dist/esm/ApplicationUtils-1569f757.js.gz +0 -0
- package/dist/esm/CSSVarsUtils-acba92d7.js.gz +0 -0
- package/dist/esm/CheckMode-bdb2ec19.js.gz +0 -0
- package/dist/esm/DialogType-54a62731.js.gz +0 -0
- package/dist/esm/EzScrollDirection-2df26c93.js.gz +0 -0
- package/dist/esm/FocusResolver-1ccbf850.js.gz +0 -0
- package/dist/esm/FormLayout-071d324c.js.gz +0 -0
- package/dist/esm/RichToolbarHelper-f3a149c4.js.gz +0 -0
- package/dist/esm/_commonjsHelpers-9943807e.js.gz +0 -0
- package/dist/esm/app-globals-c0ac93c0.js.gz +0 -0
- package/dist/esm/constants-3fabe81e.js.gz +0 -0
- package/dist/esm/ez-actions-button.entry.js.gz +0 -0
- package/dist/esm/ez-alert-list.entry.js.gz +0 -0
- package/dist/esm/ez-alert.entry.js.gz +0 -0
- package/dist/esm/ez-application.entry.js.gz +0 -0
- package/dist/esm/ez-avatar.entry.js.gz +0 -0
- package/dist/esm/ez-badge.entry.js.gz +0 -0
- package/dist/esm/ez-breadcrumb.entry.js.gz +0 -0
- package/dist/esm/ez-button.entry.js.gz +0 -0
- package/dist/esm/ez-calendar.entry.js.gz +0 -0
- package/dist/esm/ez-card-item.entry.js.gz +0 -0
- package/dist/esm/ez-chart.entry.js.gz +0 -0
- package/dist/esm/ez-check.entry.js.gz +0 -0
- package/dist/esm/ez-chip.entry.js.gz +0 -0
- package/dist/esm/ez-classic-combo-box.entry.js.gz +0 -0
- package/dist/esm/ez-classic-input.entry.js.gz +0 -0
- package/dist/esm/ez-classic-text-area.entry.js.gz +0 -0
- package/dist/esm/ez-collapsible-box.entry.js.gz +0 -0
- package/dist/esm/ez-combo-box-list_4.entry.js +1 -1
- package/dist/esm/ez-combo-box-list_4.entry.js.gz +0 -0
- package/dist/esm/ez-combo-box.entry.js.gz +0 -0
- package/dist/esm/ez-date-input.entry.js.gz +0 -0
- package/dist/esm/ez-date-time-input.entry.js.gz +0 -0
- package/dist/esm/ez-dialog.entry.js.gz +0 -0
- package/dist/esm/ez-double-list.entry.js.gz +0 -0
- package/dist/esm/ez-dropdown.entry.js.gz +0 -0
- package/dist/esm/ez-empty-card.entry.js.gz +0 -0
- package/dist/esm/ez-file-item.entry.js.gz +0 -0
- package/dist/esm/ez-filter-input.entry.js.gz +0 -0
- package/dist/esm/ez-form-view.entry.js.gz +0 -0
- package/dist/esm/ez-form.entry.js.gz +0 -0
- package/dist/esm/ez-grid-view.entry.js.gz +0 -0
- package/dist/esm/ez-grid.entry.js +1 -1
- package/dist/esm/ez-grid.entry.js.gz +0 -0
- package/dist/esm/ez-guide-navigator.entry.js.gz +0 -0
- package/dist/esm/ez-icon.entry.js.gz +0 -0
- package/dist/esm/ez-link-builder_6.entry.js.gz +0 -0
- package/dist/esm/ez-list-item.entry.js.gz +0 -0
- package/dist/esm/ez-list.entry.js.gz +0 -0
- package/dist/esm/ez-loading-bar.entry.js.gz +0 -0
- package/dist/esm/ez-modal-container.entry.js.gz +0 -0
- package/dist/esm/ez-modal.entry.js.gz +0 -0
- package/dist/esm/ez-multi-selection-list.entry.js +1 -1
- package/dist/esm/ez-multi-selection-list.entry.js.gz +0 -0
- package/dist/esm/ez-number-input.entry.js.gz +0 -0
- package/dist/esm/ez-pagination.entry.js.gz +0 -0
- package/dist/esm/ez-popover-core.entry.js +18 -2
- package/dist/esm/ez-popover-core.entry.js.gz +0 -0
- package/dist/esm/ez-popover-plus_3.entry.js +2 -0
- package/dist/esm/ez-popover-plus_3.entry.js.gz +0 -0
- package/dist/esm/ez-popover.entry.js.gz +0 -0
- package/dist/esm/ez-popup.entry.js.gz +0 -0
- package/dist/esm/ez-progress-bar.entry.js.gz +0 -0
- package/dist/esm/ez-radio-button.entry.js.gz +0 -0
- package/dist/esm/ez-rich-toolbar-item.entry.js.gz +0 -0
- package/dist/esm/ez-scroller_2.entry.js.gz +0 -0
- package/dist/esm/ez-search-plus.entry.js.gz +0 -0
- package/dist/esm/ez-search-result-list.entry.js.gz +0 -0
- package/dist/esm/ez-search.entry.js.gz +0 -0
- package/dist/esm/ez-sidebar-navigator.entry.js.gz +0 -0
- package/dist/esm/ez-skeleton.entry.js.gz +0 -0
- package/dist/esm/ez-sortable-list.entry.js.gz +0 -0
- package/dist/esm/ez-spinner.entry.js.gz +0 -0
- package/dist/esm/ez-split-button.entry.js.gz +0 -0
- package/dist/esm/ez-split-item.entry.js.gz +0 -0
- package/dist/esm/ez-split-panel.entry.js.gz +0 -0
- package/dist/esm/ez-tabselector.entry.js.gz +0 -0
- package/dist/esm/ez-tag-input.entry.js.gz +0 -0
- package/dist/esm/ez-tag.entry.js.gz +0 -0
- package/dist/esm/ez-text-area.entry.js.gz +0 -0
- package/dist/esm/ez-text-input.entry.js.gz +0 -0
- package/dist/esm/ez-tile-medium.entry.js.gz +0 -0
- package/dist/esm/ez-tile.entry.js.gz +0 -0
- package/dist/esm/ez-time-input.entry.js.gz +0 -0
- package/dist/esm/ez-toast.entry.js.gz +0 -0
- package/dist/esm/ez-tooltip.entry.js +1 -1
- package/dist/esm/ez-tooltip.entry.js.gz +0 -0
- package/dist/esm/ez-tree.entry.js.gz +0 -0
- package/dist/esm/ez-underface.entry.js.gz +0 -0
- package/dist/esm/ez-upload.entry.js.gz +0 -0
- package/dist/esm/ez-view-stack.entry.js.gz +0 -0
- package/dist/esm/ezListHelper-00fb9b8d.js.gz +0 -0
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/ezui.js.gz +0 -0
- package/dist/esm/filter-column.entry.js +7 -2
- package/dist/esm/filter-column.entry.js.gz +0 -0
- package/dist/esm/{floating-ui.dom.esm-ad30f2f0.js → floating-ui.dom.esm-c94d4011.js} +93 -1
- package/dist/esm/floating-ui.dom.esm-c94d4011.js.gz +0 -0
- package/dist/esm/index-41363fa6.js.gz +0 -0
- package/dist/esm/index-baa5e267.js.gz +0 -0
- package/dist/esm/index.js.gz +0 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loader.js.gz +0 -0
- package/dist/esm/polyfills/core-js.js.gz +0 -0
- package/dist/esm/polyfills/css-shim.js.gz +0 -0
- package/dist/esm/polyfills/dom.js.gz +0 -0
- package/dist/esm/polyfills/es5-html-element.js.gz +0 -0
- package/dist/esm/polyfills/index.js.gz +0 -0
- package/dist/esm/polyfills/system.js.gz +0 -0
- package/dist/esm/{purify-a818ad63.js → purify-2a793dce.js} +724 -262
- package/dist/esm/purify-2a793dce.js.gz +0 -0
- package/dist/esm/search-column-c20d2b01.js.gz +0 -0
- package/dist/esm/searchFormatters-8229207e.js.gz +0 -0
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/ezui.esm.js.gz +0 -0
- package/dist/ezui/index.esm.js.gz +0 -0
- package/dist/ezui/p-02d448bb.entry.js.gz +0 -0
- package/dist/ezui/p-04126429.js.gz +0 -0
- package/dist/ezui/p-05c32903.entry.js.gz +0 -0
- package/dist/ezui/p-0a1be08d.entry.js +1 -0
- package/dist/ezui/p-0a1be08d.entry.js.gz +0 -0
- package/dist/ezui/p-0f7971cf.entry.js.gz +0 -0
- package/dist/ezui/p-110cfb7d.entry.js.gz +0 -0
- package/dist/ezui/p-112455b1.js.gz +0 -0
- package/dist/ezui/p-18384b91.entry.js.gz +0 -0
- package/dist/ezui/p-1e7a8633.entry.js.gz +0 -0
- package/dist/ezui/p-1f50fa05.entry.js.gz +0 -0
- package/dist/ezui/p-20c024f7.entry.js.gz +0 -0
- package/dist/ezui/p-23a36bb6.js.gz +0 -0
- package/dist/ezui/p-24460bb2.js +1 -0
- package/dist/ezui/p-24460bb2.js.gz +0 -0
- package/dist/ezui/p-288631d1.entry.js.gz +0 -0
- package/dist/ezui/p-30ffb9ed.js.gz +0 -0
- package/dist/ezui/p-34a476a9.entry.js.gz +0 -0
- package/dist/ezui/p-39761eca.entry.js.gz +0 -0
- package/dist/ezui/p-3afa1c6e.entry.js.gz +0 -0
- package/dist/ezui/p-3ce867cf.entry.js.gz +0 -0
- package/dist/ezui/p-3e767a74.js.gz +0 -0
- package/dist/ezui/p-40a60148.js.gz +0 -0
- package/dist/ezui/p-411c0222.entry.js.gz +0 -0
- package/dist/ezui/p-4314f87a.entry.js.gz +0 -0
- package/dist/ezui/p-48effc69.entry.js.gz +0 -0
- package/dist/ezui/p-4d30b703.entry.js.gz +0 -0
- package/dist/ezui/p-4fe123b6.entry.js.gz +0 -0
- package/dist/ezui/p-5554704c.js.gz +0 -0
- package/dist/ezui/{p-7f37ee99.entry.js → p-5d7de125.entry.js} +1 -1
- package/dist/ezui/p-5d7de125.entry.js.gz +0 -0
- package/dist/ezui/p-5ed81457.entry.js.gz +0 -0
- package/dist/ezui/p-6020f3d5.entry.js.gz +0 -0
- package/dist/ezui/p-6c51ccd1.entry.js.gz +0 -0
- package/dist/ezui/p-6ca0815e.entry.js.gz +0 -0
- package/dist/ezui/p-6cb82d33.entry.js.gz +0 -0
- package/dist/ezui/p-6d596a5a.entry.js.gz +0 -0
- package/dist/ezui/p-6de4cae1.entry.js.gz +0 -0
- package/dist/ezui/p-6f77a359.entry.js.gz +0 -0
- package/dist/ezui/p-721fd999.entry.js.gz +0 -0
- package/dist/ezui/p-7995dcb4.entry.js.gz +0 -0
- package/dist/ezui/p-7f792043.entry.js.gz +0 -0
- package/dist/ezui/p-7fe97ef5.entry.js.gz +0 -0
- package/dist/ezui/p-80dfc50b.js.gz +0 -0
- package/dist/ezui/{p-351fb12f.entry.js → p-82b0afe7.entry.js} +1 -1
- package/dist/ezui/p-82b0afe7.entry.js.gz +0 -0
- package/dist/ezui/p-859e3134.entry.js.gz +0 -0
- package/dist/ezui/p-8bf077ea.entry.js +1 -0
- package/dist/ezui/p-8bf077ea.entry.js.gz +0 -0
- package/dist/ezui/p-8df1ca33.entry.js.gz +0 -0
- package/dist/ezui/p-91c9d50e.entry.js.gz +0 -0
- package/dist/ezui/p-93e1c917.entry.js.gz +0 -0
- package/dist/ezui/p-948f0fb2.entry.js.gz +0 -0
- package/dist/ezui/p-94deb71e.entry.js.gz +0 -0
- package/dist/ezui/p-98bb8b16.js.gz +0 -0
- package/dist/ezui/p-9ab2add9.entry.js.gz +0 -0
- package/dist/ezui/p-9b215871.entry.js.gz +0 -0
- package/dist/ezui/p-9b3f3c02.entry.js.gz +0 -0
- package/dist/ezui/p-9f5fa3f9.entry.js.gz +0 -0
- package/dist/ezui/p-a0bf1fc7.entry.js.gz +0 -0
- package/dist/ezui/p-a278f26e.entry.js.gz +0 -0
- package/dist/ezui/p-a3075f52.entry.js.gz +0 -0
- package/dist/ezui/p-a3ada561.entry.js.gz +0 -0
- package/dist/ezui/p-a4083a7a.entry.js.gz +0 -0
- package/dist/ezui/p-a61fdd20.js.gz +0 -0
- package/dist/ezui/p-a63b20a0.entry.js.gz +0 -0
- package/dist/ezui/p-a80b1287.entry.js.gz +0 -0
- package/dist/ezui/p-a80e6b24.entry.js +1 -0
- package/dist/ezui/p-a80e6b24.entry.js.gz +0 -0
- package/dist/ezui/p-ab574d59.js.gz +0 -0
- package/dist/ezui/p-b1e45320.js.gz +0 -0
- package/dist/ezui/p-b3d8034b.entry.js.gz +0 -0
- package/dist/ezui/p-b853763b.js.gz +0 -0
- package/dist/ezui/p-b989a33e.entry.js.gz +0 -0
- package/dist/ezui/p-baec56c9.js.gz +0 -0
- package/dist/ezui/{p-183db57c.entry.js → p-bc139838.entry.js} +1 -1
- package/dist/ezui/p-bc139838.entry.js.gz +0 -0
- package/dist/ezui/p-bc2f844e.entry.js.gz +0 -0
- package/dist/ezui/p-bc8e5c3d.js +3 -0
- package/dist/ezui/p-bc8e5c3d.js.gz +0 -0
- package/dist/ezui/p-cde41310.entry.js.gz +0 -0
- package/dist/ezui/p-ce0b36d7.entry.js.gz +0 -0
- package/dist/ezui/p-d2645bdf.entry.js.gz +0 -0
- package/dist/ezui/p-d5eb2fad.entry.js.gz +0 -0
- package/dist/ezui/p-d6742c1e.entry.js.gz +0 -0
- package/dist/ezui/p-d6bb930d.entry.js.gz +0 -0
- package/dist/ezui/p-d6f50207.entry.js.gz +0 -0
- package/dist/ezui/p-d8cc640d.entry.js.gz +0 -0
- package/dist/ezui/p-dc628ed3.js.gz +0 -0
- package/dist/ezui/p-de862af4.entry.js.gz +0 -0
- package/dist/ezui/p-dee18824.entry.js.gz +0 -0
- package/dist/ezui/p-e5de42e7.entry.js.gz +0 -0
- package/dist/ezui/p-e75c7a23.entry.js.gz +0 -0
- package/dist/ezui/p-e7a7c594.entry.js.gz +0 -0
- package/dist/ezui/p-e8c57463.entry.js.gz +0 -0
- package/dist/ezui/p-ec7db713.js.gz +0 -0
- package/dist/ezui/p-ecd6409d.entry.js.gz +0 -0
- package/dist/ezui/p-f00c9dc2.entry.js.gz +0 -0
- package/dist/ezui/p-f34ec732.entry.js.gz +0 -0
- package/dist/ezui/p-fa6732f2.entry.js.gz +0 -0
- package/dist/ezui/{p-c9ef8551.entry.js → p-fd96baa6.entry.js} +1 -1
- package/dist/ezui/p-fd96baa6.entry.js.gz +0 -0
- package/dist/index.cjs.js.gz +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/types/components/ez-popover-plus/ez-popover-plus.d.ts +7 -0
- package/dist/types/components/ez-popover-plus/subcomponent/ez-popover-core.d.ts +9 -0
- package/dist/types/components.d.ts +16 -0
- package/package.json +1 -1
- package/dist/cjs/floating-ui.dom.esm-f4d87617.js.gz +0 -0
- package/dist/cjs/purify-ca9603eb.js.gz +0 -0
- package/dist/esm/floating-ui.dom.esm-ad30f2f0.js.gz +0 -0
- package/dist/esm/purify-a818ad63.js.gz +0 -0
- package/dist/ezui/p-183db57c.entry.js.gz +0 -0
- package/dist/ezui/p-197eb577.js +0 -3
- package/dist/ezui/p-197eb577.js.gz +0 -0
- package/dist/ezui/p-2528e988.entry.js +0 -1
- package/dist/ezui/p-2528e988.entry.js.gz +0 -0
- package/dist/ezui/p-2a806303.js +0 -1
- package/dist/ezui/p-2a806303.js.gz +0 -0
- package/dist/ezui/p-2b49aa22.entry.js +0 -1
- package/dist/ezui/p-2b49aa22.entry.js.gz +0 -0
- package/dist/ezui/p-351fb12f.entry.js.gz +0 -0
- package/dist/ezui/p-7f37ee99.entry.js.gz +0 -0
- package/dist/ezui/p-c9ef8551.entry.js.gz +0 -0
- package/dist/ezui/p-ef8bd3e8.entry.js +0 -1
- package/dist/ezui/p-ef8bd3e8.entry.js.gz +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const _commonjsHelpers = require('./_commonjsHelpers-537d719a.js');
|
|
4
4
|
|
|
5
5
|
var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
6
|
-
/*! @license DOMPurify 3.4.
|
|
6
|
+
/*! @license DOMPurify 3.4.11 | (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.11/LICENSE */
|
|
7
7
|
|
|
8
8
|
(function (global, factory) {
|
|
9
9
|
module.exports = factory() ;
|
|
@@ -335,8 +335,14 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
335
335
|
);
|
|
336
336
|
const DOCTYPE_NAME = seal(/^html$/i);
|
|
337
337
|
const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
338
|
+
// Markup-significant character probes used by _sanitizeElements.
|
|
339
|
+
// Shared module-level instances are safe despite the sticky /g flags:
|
|
340
|
+
// unapply() resets lastIndex for RegExp receivers before every call.
|
|
341
|
+
const ELEMENT_MARKUP_PROBE = seal(/<[/\w!]/g);
|
|
342
|
+
const COMMENT_MARKUP_PROBE = seal(/<[/\w]/g);
|
|
343
|
+
const FALLBACK_TAG_CLOSE = seal(/<\/no(script|embed|frames)/i);
|
|
344
|
+
const SELF_CLOSING_TAG = seal(/\/>/i);
|
|
338
345
|
|
|
339
|
-
/* eslint-disable @typescript-eslint/indent */
|
|
340
346
|
// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
|
|
341
347
|
const NODE_TYPE = {
|
|
342
348
|
element: 1,
|
|
@@ -347,7 +353,7 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
347
353
|
// Deprecated
|
|
348
354
|
entityNode: 6,
|
|
349
355
|
// Deprecated
|
|
350
|
-
|
|
356
|
+
processingInstruction: 7,
|
|
351
357
|
comment: 8,
|
|
352
358
|
document: 9,
|
|
353
359
|
documentType: 10,
|
|
@@ -407,10 +413,25 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
407
413
|
uponSanitizeShadowNode: []
|
|
408
414
|
};
|
|
409
415
|
};
|
|
416
|
+
/**
|
|
417
|
+
* Resolve a set-valued configuration option: a fresh set built from
|
|
418
|
+
* cfg[key] when it is an own array property (seeded with a clone of
|
|
419
|
+
* options.base when given, case-normalized via options.transform),
|
|
420
|
+
* the fallback set otherwise.
|
|
421
|
+
*
|
|
422
|
+
* @param cfg the cloned, prototype-free configuration object
|
|
423
|
+
* @param key the configuration property to read
|
|
424
|
+
* @param fallback the set to use when the option is absent or not an array
|
|
425
|
+
* @param options transform and optional base set to merge into
|
|
426
|
+
* @returns the resolved set
|
|
427
|
+
*/
|
|
428
|
+
const _resolveSetOption = function _resolveSetOption(cfg, key, fallback, options) {
|
|
429
|
+
return objectHasOwnProperty(cfg, key) && arrayIsArray(cfg[key]) ? addToSet(options.base ? clone(options.base) : {}, cfg[key], options.transform) : fallback;
|
|
430
|
+
};
|
|
410
431
|
function createDOMPurify() {
|
|
411
432
|
let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
|
|
412
433
|
const DOMPurify = root => createDOMPurify(root);
|
|
413
|
-
DOMPurify.version = '3.4.
|
|
434
|
+
DOMPurify.version = '3.4.11';
|
|
414
435
|
DOMPurify.removed = [];
|
|
415
436
|
if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
|
|
416
437
|
// Not running in a browser, provide a factory function
|
|
@@ -451,23 +472,54 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
451
472
|
}
|
|
452
473
|
let trustedTypesPolicy;
|
|
453
474
|
let emptyHTML = '';
|
|
475
|
+
// The instance's own internal Trusted Types policy. Unlike a caller-supplied
|
|
476
|
+
// `TRUSTED_TYPES_POLICY`, this is created at most once — Trusted Types throws
|
|
477
|
+
// on duplicate policy names — and is the only policy allowed to persist
|
|
478
|
+
// across configurations and survive `clearConfig()`.
|
|
479
|
+
let defaultTrustedTypesPolicy;
|
|
480
|
+
let defaultTrustedTypesPolicyResolved = false;
|
|
454
481
|
// Tracks whether we are already inside a call to the configured Trusted Types
|
|
455
|
-
// policy
|
|
482
|
+
// policy (`createHTML` or `createScriptURL`). If a supplied policy callback
|
|
456
483
|
// itself calls `DOMPurify.sanitize` (the cause of #1422), `sanitize` would
|
|
457
484
|
// re-enter the policy and recurse until the stack overflows. We detect that
|
|
458
|
-
// re-entry and throw a clear, actionable error instead.
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
485
|
+
// re-entry and throw a clear, actionable error instead. The guard is shared
|
|
486
|
+
// across both callbacks, because either one re-entering `sanitize` triggers
|
|
487
|
+
// the same unbounded recursion.
|
|
488
|
+
let IN_TRUSTED_TYPES_POLICY = 0;
|
|
489
|
+
const _assertNotInTrustedTypesPolicy = function _assertNotInTrustedTypesPolicy() {
|
|
490
|
+
if (IN_TRUSTED_TYPES_POLICY > 0) {
|
|
491
|
+
throw typeErrorCreate('A configured TRUSTED_TYPES_POLICY callback (createHTML or ' + 'createScriptURL) must not call DOMPurify.sanitize, as that causes ' + 'infinite recursion. Do not pass a policy whose callbacks wrap ' + 'DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted ' + 'Types" section of the README.');
|
|
463
492
|
}
|
|
464
|
-
|
|
493
|
+
};
|
|
494
|
+
const _createTrustedHTML = function _createTrustedHTML(html) {
|
|
495
|
+
_assertNotInTrustedTypesPolicy();
|
|
496
|
+
IN_TRUSTED_TYPES_POLICY++;
|
|
465
497
|
try {
|
|
466
498
|
return trustedTypesPolicy.createHTML(html);
|
|
467
499
|
} finally {
|
|
468
|
-
|
|
500
|
+
IN_TRUSTED_TYPES_POLICY--;
|
|
469
501
|
}
|
|
470
502
|
};
|
|
503
|
+
const _createTrustedScriptURL = function _createTrustedScriptURL(scriptUrl) {
|
|
504
|
+
_assertNotInTrustedTypesPolicy();
|
|
505
|
+
IN_TRUSTED_TYPES_POLICY++;
|
|
506
|
+
try {
|
|
507
|
+
return trustedTypesPolicy.createScriptURL(scriptUrl);
|
|
508
|
+
} finally {
|
|
509
|
+
IN_TRUSTED_TYPES_POLICY--;
|
|
510
|
+
}
|
|
511
|
+
};
|
|
512
|
+
// Lazily resolve (and cache) the instance's internal default policy.
|
|
513
|
+
// Resolution is attempted at most once: a successful `createPolicy` cannot be
|
|
514
|
+
// repeated (Trusted Types throws on duplicate names), and a failed or
|
|
515
|
+
// unsupported attempt must not be retried on every parse.
|
|
516
|
+
const _getDefaultTrustedTypesPolicy = function _getDefaultTrustedTypesPolicy() {
|
|
517
|
+
if (!defaultTrustedTypesPolicyResolved) {
|
|
518
|
+
defaultTrustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
|
|
519
|
+
defaultTrustedTypesPolicyResolved = true;
|
|
520
|
+
}
|
|
521
|
+
return defaultTrustedTypesPolicy;
|
|
522
|
+
};
|
|
471
523
|
const _document = document,
|
|
472
524
|
implementation = _document.implementation,
|
|
473
525
|
createNodeIterator = _document.createNodeIterator,
|
|
@@ -564,6 +616,13 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
564
616
|
let WHOLE_DOCUMENT = false;
|
|
565
617
|
/* Track whether config is already set on this instance of DOMPurify. */
|
|
566
618
|
let SET_CONFIG = false;
|
|
619
|
+
/* Pristine allowlist bindings captured at setConfig() time. On the
|
|
620
|
+
* persistent-config path sanitize() restores the sets from these before
|
|
621
|
+
* the per-walk hook clone-guard, so a hook's in-call widening cannot
|
|
622
|
+
* carry across calls. Null until setConfig() is called; reset by
|
|
623
|
+
* clearConfig(). */
|
|
624
|
+
let SET_CONFIG_ALLOWED_TAGS = null;
|
|
625
|
+
let SET_CONFIG_ALLOWED_ATTR = null;
|
|
567
626
|
/* Decide if all elements (e.g. style, script) must be children of
|
|
568
627
|
* document.body. By default, browsers might move them to document.head */
|
|
569
628
|
let FORCE_BODY = false;
|
|
@@ -606,7 +665,17 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
606
665
|
let USE_PROFILES = {};
|
|
607
666
|
/* Tags to ignore content of when KEEP_CONTENT is true */
|
|
608
667
|
let FORBID_CONTENTS = null;
|
|
609
|
-
const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script',
|
|
668
|
+
const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script',
|
|
669
|
+
// <selectedcontent> mirrors the selected <option>'s subtree, cloned by
|
|
670
|
+
// the UA (customizable <select>) — including any on* handlers — and the
|
|
671
|
+
// engine re-mirrors synchronously whenever a removal changes which
|
|
672
|
+
// option/selectedcontent is current, even inside DOMPurify's inert
|
|
673
|
+
// DOMParser document. Hoisting its children on removal re-inserts a fresh
|
|
674
|
+
// mirror target ahead of the walk, which the engine refills, looping
|
|
675
|
+
// forever (DoS) and amplifying output. Dropping its content on removal
|
|
676
|
+
// (rather than hoisting) breaks that cascade; the content is a duplicate
|
|
677
|
+
// of the option, which is sanitized on its own. See campaign-3 F1/F6.
|
|
678
|
+
'selectedcontent', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);
|
|
610
679
|
/* Tags that are safe for data: URIs */
|
|
611
680
|
let DATA_URI_TAGS = null;
|
|
612
681
|
const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
|
|
@@ -622,8 +691,10 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
622
691
|
/* Allowed XHTML+XML namespaces */
|
|
623
692
|
let ALLOWED_NAMESPACES = null;
|
|
624
693
|
const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
|
|
625
|
-
|
|
626
|
-
let
|
|
694
|
+
const DEFAULT_MATHML_TEXT_INTEGRATION_POINTS = freeze(['mi', 'mo', 'mn', 'ms', 'mtext']);
|
|
695
|
+
let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS);
|
|
696
|
+
const DEFAULT_HTML_INTEGRATION_POINTS = freeze(['annotation-xml']);
|
|
697
|
+
let HTML_INTEGRATION_POINTS = addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS);
|
|
627
698
|
// Certain elements are allowed in both SVG and HTML
|
|
628
699
|
// namespace. We need to specify them explicitly
|
|
629
700
|
// so that they don't get erroneously deleted from
|
|
@@ -665,14 +736,32 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
665
736
|
// HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
|
|
666
737
|
transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;
|
|
667
738
|
/* Set configuration parameters */
|
|
668
|
-
ALLOWED_TAGS =
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
739
|
+
ALLOWED_TAGS = _resolveSetOption(cfg, 'ALLOWED_TAGS', DEFAULT_ALLOWED_TAGS, {
|
|
740
|
+
transform: transformCaseFunc
|
|
741
|
+
});
|
|
742
|
+
ALLOWED_ATTR = _resolveSetOption(cfg, 'ALLOWED_ATTR', DEFAULT_ALLOWED_ATTR, {
|
|
743
|
+
transform: transformCaseFunc
|
|
744
|
+
});
|
|
745
|
+
ALLOWED_NAMESPACES = _resolveSetOption(cfg, 'ALLOWED_NAMESPACES', DEFAULT_ALLOWED_NAMESPACES, {
|
|
746
|
+
transform: stringToString
|
|
747
|
+
});
|
|
748
|
+
URI_SAFE_ATTRIBUTES = _resolveSetOption(cfg, 'ADD_URI_SAFE_ATTR', DEFAULT_URI_SAFE_ATTRIBUTES, {
|
|
749
|
+
transform: transformCaseFunc,
|
|
750
|
+
base: DEFAULT_URI_SAFE_ATTRIBUTES
|
|
751
|
+
});
|
|
752
|
+
DATA_URI_TAGS = _resolveSetOption(cfg, 'ADD_DATA_URI_TAGS', DEFAULT_DATA_URI_TAGS, {
|
|
753
|
+
transform: transformCaseFunc,
|
|
754
|
+
base: DEFAULT_DATA_URI_TAGS
|
|
755
|
+
});
|
|
756
|
+
FORBID_CONTENTS = _resolveSetOption(cfg, 'FORBID_CONTENTS', DEFAULT_FORBID_CONTENTS, {
|
|
757
|
+
transform: transformCaseFunc
|
|
758
|
+
});
|
|
759
|
+
FORBID_TAGS = _resolveSetOption(cfg, 'FORBID_TAGS', clone({}), {
|
|
760
|
+
transform: transformCaseFunc
|
|
761
|
+
});
|
|
762
|
+
FORBID_ATTR = _resolveSetOption(cfg, 'FORBID_ATTR', clone({}), {
|
|
763
|
+
transform: transformCaseFunc
|
|
764
|
+
});
|
|
676
765
|
USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === 'object' ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;
|
|
677
766
|
ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
|
|
678
767
|
ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
|
|
@@ -691,8 +780,8 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
691
780
|
IN_PLACE = cfg.IN_PLACE || false; // Default false
|
|
692
781
|
IS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI; // Default regexp
|
|
693
782
|
NAMESPACE = typeof cfg.NAMESPACE === 'string' ? cfg.NAMESPACE : HTML_NAMESPACE; // Default HTML namespace
|
|
694
|
-
MATHML_TEXT_INTEGRATION_POINTS = objectHasOwnProperty(cfg, 'MATHML_TEXT_INTEGRATION_POINTS') && cfg.MATHML_TEXT_INTEGRATION_POINTS && typeof cfg.MATHML_TEXT_INTEGRATION_POINTS === 'object' ? clone(cfg.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({},
|
|
695
|
-
HTML_INTEGRATION_POINTS = objectHasOwnProperty(cfg, 'HTML_INTEGRATION_POINTS') && cfg.HTML_INTEGRATION_POINTS && typeof cfg.HTML_INTEGRATION_POINTS === 'object' ? clone(cfg.HTML_INTEGRATION_POINTS) : addToSet({},
|
|
783
|
+
MATHML_TEXT_INTEGRATION_POINTS = objectHasOwnProperty(cfg, 'MATHML_TEXT_INTEGRATION_POINTS') && cfg.MATHML_TEXT_INTEGRATION_POINTS && typeof cfg.MATHML_TEXT_INTEGRATION_POINTS === 'object' ? clone(cfg.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS); // Default built-in map
|
|
784
|
+
HTML_INTEGRATION_POINTS = objectHasOwnProperty(cfg, 'HTML_INTEGRATION_POINTS') && cfg.HTML_INTEGRATION_POINTS && typeof cfg.HTML_INTEGRATION_POINTS === 'object' ? clone(cfg.HTML_INTEGRATION_POINTS) : addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS); // Default built-in map
|
|
696
785
|
const customElementHandling = objectHasOwnProperty(cfg, 'CUSTOM_ELEMENT_HANDLING') && cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING === 'object' ? clone(cfg.CUSTOM_ELEMENT_HANDLING) : create(null);
|
|
697
786
|
CUSTOM_ELEMENT_HANDLING = create(null);
|
|
698
787
|
if (objectHasOwnProperty(customElementHandling, 'tagNameCheck') && isRegexOrFunction(customElementHandling.tagNameCheck)) {
|
|
@@ -704,6 +793,7 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
704
793
|
if (objectHasOwnProperty(customElementHandling, 'allowCustomizedBuiltInElements') && typeof customElementHandling.allowCustomizedBuiltInElements === 'boolean') {
|
|
705
794
|
CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements; // Default undefined
|
|
706
795
|
}
|
|
796
|
+
seal(CUSTOM_ELEMENT_HANDLING);
|
|
707
797
|
if (SAFE_FOR_TEMPLATES) {
|
|
708
798
|
ALLOW_DATA_ATTR = false;
|
|
709
799
|
}
|
|
@@ -787,6 +877,13 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
787
877
|
addToSet(ALLOWED_TAGS, ['tbody']);
|
|
788
878
|
delete FORBID_TAGS.tbody;
|
|
789
879
|
}
|
|
880
|
+
// Re-derive the active Trusted Types policy from this configuration on
|
|
881
|
+
// every parse. The active policy must never be sticky closure state that
|
|
882
|
+
// outlives the config that set it: a caller-supplied policy left in place
|
|
883
|
+
// after `clearConfig()` — or after a later call that supplied none, or
|
|
884
|
+
// `TRUSTED_TYPES_POLICY: null` — could sign a subsequent "default"
|
|
885
|
+
// `RETURN_TRUSTED_TYPE` result with a foreign, possibly unsafe policy.
|
|
886
|
+
// See GHSA-vxr8-fq34-vvx9.
|
|
790
887
|
if (cfg.TRUSTED_TYPES_POLICY) {
|
|
791
888
|
if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {
|
|
792
889
|
throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
@@ -794,7 +891,7 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
794
891
|
if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {
|
|
795
892
|
throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
796
893
|
}
|
|
797
|
-
//
|
|
894
|
+
// A caller-supplied policy applies to this configuration only.
|
|
798
895
|
const previousTrustedTypesPolicy = trustedTypesPolicy;
|
|
799
896
|
trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
|
|
800
897
|
// Sign local variables required by `sanitize`. If the supplied policy's
|
|
@@ -807,35 +904,34 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
807
904
|
trustedTypesPolicy = previousTrustedTypesPolicy;
|
|
808
905
|
throw error;
|
|
809
906
|
}
|
|
907
|
+
} else if (cfg.TRUSTED_TYPES_POLICY === null) {
|
|
908
|
+
// Explicit opt-out for this call: perform no Trusted Types signing and
|
|
909
|
+
// create nothing (so a strict `trusted-types` CSP that disallows a
|
|
910
|
+
// `dompurify` policy can still call `sanitize` from inside its own
|
|
911
|
+
// policy — see #1422). Resetting to `undefined` rather than a sticky
|
|
912
|
+
// `null` also drops any previously retained caller policy, so it cannot
|
|
913
|
+
// resurface on a later call, while still allowing the next config-less
|
|
914
|
+
// call to restore the internal default policy. See GHSA-vxr8-fq34-vvx9.
|
|
915
|
+
trustedTypesPolicy = undefined;
|
|
916
|
+
emptyHTML = '';
|
|
810
917
|
} else {
|
|
811
|
-
//
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
//
|
|
816
|
-
//
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
918
|
+
// No policy supplied: keep the currently active policy if one is set — a
|
|
919
|
+
// previously supplied policy is intentionally sticky across config-less
|
|
920
|
+
// calls — otherwise fall back to the instance's own internal policy,
|
|
921
|
+
// created at most once. (A policy supplied for a *single* call still
|
|
922
|
+
// lingers by design; what must not linger is a policy whose configuration
|
|
923
|
+
// has been torn down via `clearConfig()`, which restores the default.)
|
|
924
|
+
if (trustedTypesPolicy === undefined) {
|
|
925
|
+
trustedTypesPolicy = _getDefaultTrustedTypesPolicy();
|
|
926
|
+
}
|
|
927
|
+
// Sign internal variables only when a policy is active. A falsy policy
|
|
928
|
+
// (Trusted Types unsupported, creation failed, or an explicit opt-out)
|
|
929
|
+
// leaves `emptyHTML` as a plain string, so we never call `.createHTML` on
|
|
930
|
+
// a non-policy and throw. See #1422.
|
|
820
931
|
if (trustedTypesPolicy && typeof emptyHTML === 'string') {
|
|
821
932
|
emptyHTML = _createTrustedHTML('');
|
|
822
933
|
}
|
|
823
934
|
}
|
|
824
|
-
/*
|
|
825
|
-
* Mirror the clone-before-mutate pattern already applied above for
|
|
826
|
-
* cfg.ADD_TAGS / cfg.ADD_ATTR: if any uponSanitize* hook is
|
|
827
|
-
* registered AND the set still points at the default constant,
|
|
828
|
-
* clone it. The hook then mutates the clone (in-call widening
|
|
829
|
-
* still works exactly as documented) and the next default-cfg
|
|
830
|
-
* call rebinds to the untouched original via the reassignment at
|
|
831
|
-
* the top of this function.
|
|
832
|
-
*/
|
|
833
|
-
if ((hooks.uponSanitizeElement.length > 0 || hooks.uponSanitizeAttribute.length > 0) && ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
|
|
834
|
-
ALLOWED_TAGS = clone(ALLOWED_TAGS);
|
|
835
|
-
}
|
|
836
|
-
if (hooks.uponSanitizeAttribute.length > 0 && ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
|
|
837
|
-
ALLOWED_ATTR = clone(ALLOWED_ATTR);
|
|
838
|
-
}
|
|
839
935
|
// Prevent further manipulation of configuration.
|
|
840
936
|
// Not available in IE8, Safari 5, etc.
|
|
841
937
|
if (freeze) {
|
|
@@ -848,6 +944,77 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
848
944
|
* correctly. */
|
|
849
945
|
const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);
|
|
850
946
|
const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
|
|
947
|
+
/**
|
|
948
|
+
* Namespace rules for an element in the SVG namespace.
|
|
949
|
+
*
|
|
950
|
+
* @param tagName the element's lowercase tag name
|
|
951
|
+
* @param parent the (possibly simulated) parent node
|
|
952
|
+
* @param parentTagName the parent's lowercase tag name
|
|
953
|
+
* @returns true if a spec-compliant parser could produce this element
|
|
954
|
+
*/
|
|
955
|
+
const _checkSvgNamespace = function _checkSvgNamespace(tagName, parent, parentTagName) {
|
|
956
|
+
// The only way to switch from HTML namespace to SVG
|
|
957
|
+
// is via <svg>. If it happens via any other tag, then
|
|
958
|
+
// it should be killed.
|
|
959
|
+
if (parent.namespaceURI === HTML_NAMESPACE) {
|
|
960
|
+
return tagName === 'svg';
|
|
961
|
+
}
|
|
962
|
+
// The only way to switch from MathML to SVG is via <svg>
|
|
963
|
+
// if the parent is either <annotation-xml> or a MathML
|
|
964
|
+
// text integration point.
|
|
965
|
+
if (parent.namespaceURI === MATHML_NAMESPACE) {
|
|
966
|
+
return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
|
|
967
|
+
}
|
|
968
|
+
// We only allow elements that are defined in SVG
|
|
969
|
+
// spec. All others are disallowed in SVG namespace.
|
|
970
|
+
return Boolean(ALL_SVG_TAGS[tagName]);
|
|
971
|
+
};
|
|
972
|
+
/**
|
|
973
|
+
* Namespace rules for an element in the MathML namespace.
|
|
974
|
+
*
|
|
975
|
+
* @param tagName the element's lowercase tag name
|
|
976
|
+
* @param parent the (possibly simulated) parent node
|
|
977
|
+
* @param parentTagName the parent's lowercase tag name
|
|
978
|
+
* @returns true if a spec-compliant parser could produce this element
|
|
979
|
+
*/
|
|
980
|
+
const _checkMathMlNamespace = function _checkMathMlNamespace(tagName, parent, parentTagName) {
|
|
981
|
+
// The only way to switch from HTML namespace to MathML
|
|
982
|
+
// is via <math>. If it happens via any other tag, then
|
|
983
|
+
// it should be killed.
|
|
984
|
+
if (parent.namespaceURI === HTML_NAMESPACE) {
|
|
985
|
+
return tagName === 'math';
|
|
986
|
+
}
|
|
987
|
+
// The only way to switch from SVG to MathML is via
|
|
988
|
+
// <math> and HTML integration points
|
|
989
|
+
if (parent.namespaceURI === SVG_NAMESPACE) {
|
|
990
|
+
return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
|
|
991
|
+
}
|
|
992
|
+
// We only allow elements that are defined in MathML
|
|
993
|
+
// spec. All others are disallowed in MathML namespace.
|
|
994
|
+
return Boolean(ALL_MATHML_TAGS[tagName]);
|
|
995
|
+
};
|
|
996
|
+
/**
|
|
997
|
+
* Namespace rules for an element in the HTML namespace.
|
|
998
|
+
*
|
|
999
|
+
* @param tagName the element's lowercase tag name
|
|
1000
|
+
* @param parent the (possibly simulated) parent node
|
|
1001
|
+
* @param parentTagName the parent's lowercase tag name
|
|
1002
|
+
* @returns true if a spec-compliant parser could produce this element
|
|
1003
|
+
*/
|
|
1004
|
+
const _checkHtmlNamespace = function _checkHtmlNamespace(tagName, parent, parentTagName) {
|
|
1005
|
+
// The only way to switch from SVG to HTML is via
|
|
1006
|
+
// HTML integration points, and from MathML to HTML
|
|
1007
|
+
// is via MathML text integration points
|
|
1008
|
+
if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
|
|
1009
|
+
return false;
|
|
1010
|
+
}
|
|
1011
|
+
if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
|
|
1012
|
+
return false;
|
|
1013
|
+
}
|
|
1014
|
+
// We disallow tags that are specific for MathML
|
|
1015
|
+
// or SVG and should never appear in HTML namespace
|
|
1016
|
+
return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
|
|
1017
|
+
};
|
|
851
1018
|
/**
|
|
852
1019
|
* @param element a DOM element whose namespace is being checked
|
|
853
1020
|
* @returns Return false if the element has a
|
|
@@ -870,51 +1037,13 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
870
1037
|
return false;
|
|
871
1038
|
}
|
|
872
1039
|
if (element.namespaceURI === SVG_NAMESPACE) {
|
|
873
|
-
|
|
874
|
-
// is via <svg>. If it happens via any other tag, then
|
|
875
|
-
// it should be killed.
|
|
876
|
-
if (parent.namespaceURI === HTML_NAMESPACE) {
|
|
877
|
-
return tagName === 'svg';
|
|
878
|
-
}
|
|
879
|
-
// The only way to switch from MathML to SVG is via`
|
|
880
|
-
// svg if parent is either <annotation-xml> or MathML
|
|
881
|
-
// text integration points.
|
|
882
|
-
if (parent.namespaceURI === MATHML_NAMESPACE) {
|
|
883
|
-
return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
|
|
884
|
-
}
|
|
885
|
-
// We only allow elements that are defined in SVG
|
|
886
|
-
// spec. All others are disallowed in SVG namespace.
|
|
887
|
-
return Boolean(ALL_SVG_TAGS[tagName]);
|
|
1040
|
+
return _checkSvgNamespace(tagName, parent, parentTagName);
|
|
888
1041
|
}
|
|
889
1042
|
if (element.namespaceURI === MATHML_NAMESPACE) {
|
|
890
|
-
|
|
891
|
-
// is via <math>. If it happens via any other tag, then
|
|
892
|
-
// it should be killed.
|
|
893
|
-
if (parent.namespaceURI === HTML_NAMESPACE) {
|
|
894
|
-
return tagName === 'math';
|
|
895
|
-
}
|
|
896
|
-
// The only way to switch from SVG to MathML is via
|
|
897
|
-
// <math> and HTML integration points
|
|
898
|
-
if (parent.namespaceURI === SVG_NAMESPACE) {
|
|
899
|
-
return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
|
|
900
|
-
}
|
|
901
|
-
// We only allow elements that are defined in MathML
|
|
902
|
-
// spec. All others are disallowed in MathML namespace.
|
|
903
|
-
return Boolean(ALL_MATHML_TAGS[tagName]);
|
|
1043
|
+
return _checkMathMlNamespace(tagName, parent, parentTagName);
|
|
904
1044
|
}
|
|
905
1045
|
if (element.namespaceURI === HTML_NAMESPACE) {
|
|
906
|
-
|
|
907
|
-
// HTML integration points, and from MathML to HTML
|
|
908
|
-
// is via MathML text integration points
|
|
909
|
-
if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
|
|
910
|
-
return false;
|
|
911
|
-
}
|
|
912
|
-
if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
|
|
913
|
-
return false;
|
|
914
|
-
}
|
|
915
|
-
// We disallow tags that are specific for MathML
|
|
916
|
-
// or SVG and should never appear in HTML namespace
|
|
917
|
-
return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
|
|
1046
|
+
return _checkHtmlNamespace(tagName, parent, parentTagName);
|
|
918
1047
|
}
|
|
919
1048
|
// For XHTML and XML documents that support custom namespaces
|
|
920
1049
|
if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {
|
|
@@ -939,7 +1068,74 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
939
1068
|
// eslint-disable-next-line unicorn/prefer-dom-node-remove
|
|
940
1069
|
getParentNode(node).removeChild(node);
|
|
941
1070
|
} catch (_) {
|
|
1071
|
+
/* The normal detach failed — this is reached for a parentless node
|
|
1072
|
+
(getParentNode() is null, so .removeChild throws). Element.prototype
|
|
1073
|
+
.remove() is itself a spec no-op on a parentless node, so a recorded
|
|
1074
|
+
"removal" would otherwise hand the caller back an intact,
|
|
1075
|
+
payload-bearing node (e.g. a detached IN_PLACE root the mXSS canary or
|
|
1076
|
+
the style-with-element-child rule decided to kill). Fail closed by
|
|
1077
|
+
throwing — exactly as a clobbered root does at the IN_PLACE entry —
|
|
1078
|
+
rather than trying to "neutralize" the node via its own methods.
|
|
1079
|
+
Neutralizing would mean calling getAttributeNames()/removeAttribute()
|
|
1080
|
+
on the node, both of which a <form> root can clobber via a named child
|
|
1081
|
+
(and _isClobbered does not even probe getAttributeNames), so the
|
|
1082
|
+
neutralize step could itself be silently defeated, leaving the payload
|
|
1083
|
+
intact. A throw touches only the cached, clobber-safe remove() and
|
|
1084
|
+
getParentNode(). Generalizes GHSA-r47g-fvhr-h676 (clobbered-form root)
|
|
1085
|
+
to every root-kill reason. REPORT-3.
|
|
1086
|
+
This lives inside the catch, so it never fires for a normally-removed
|
|
1087
|
+
in-tree node: those have a parent, removeChild() succeeds, and the
|
|
1088
|
+
catch is not entered. Only a kept (parentless) root reaches here. */
|
|
942
1089
|
remove(node);
|
|
1090
|
+
if (!getParentNode(node)) {
|
|
1091
|
+
throw typeErrorCreate('a node selected for removal could not be detached from its tree ' + 'and cannot be safely returned; refusing to sanitize in place');
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
};
|
|
1095
|
+
/**
|
|
1096
|
+
* _neutralizeRoot
|
|
1097
|
+
*
|
|
1098
|
+
* Fail-closed teardown of an in-place root after the sanitize walk aborts
|
|
1099
|
+
* (campaign-3 F2). An internal throw mid-walk — e.g. a page-registered
|
|
1100
|
+
* custom element's reaction detaches a node so `_forceRemove`'s deliberate
|
|
1101
|
+
* parentless guard throws, or any other re-entrant engine mutation — would
|
|
1102
|
+
* otherwise leave the caller's *live* tree half-sanitized, with everything
|
|
1103
|
+
* after the abort point still carrying its handlers. There is no safe way
|
|
1104
|
+
* to resume the walk (the tree mutated under us), so we strip the root bare:
|
|
1105
|
+
* remove every child and every attribute, then let the caller's catch see
|
|
1106
|
+
* the original error. Clobber-safe (cached `remove`/`childNodes`/`attributes`
|
|
1107
|
+
* getters; the root was already clobber-pre-flighted at the IN_PLACE entry).
|
|
1108
|
+
*
|
|
1109
|
+
* @param root the in-place root to empty
|
|
1110
|
+
*/
|
|
1111
|
+
const _neutralizeRoot = function _neutralizeRoot(root) {
|
|
1112
|
+
const childNodes = getChildNodes(root);
|
|
1113
|
+
if (childNodes) {
|
|
1114
|
+
const snapshot = [];
|
|
1115
|
+
arrayForEach(childNodes, child => {
|
|
1116
|
+
arrayPush(snapshot, child);
|
|
1117
|
+
});
|
|
1118
|
+
arrayForEach(snapshot, child => {
|
|
1119
|
+
try {
|
|
1120
|
+
remove(child);
|
|
1121
|
+
} catch (_) {
|
|
1122
|
+
/* Best-effort teardown; a still-attached child is handled below */
|
|
1123
|
+
}
|
|
1124
|
+
});
|
|
1125
|
+
}
|
|
1126
|
+
const attributes = getAttributes(root);
|
|
1127
|
+
if (attributes) {
|
|
1128
|
+
for (let i = attributes.length - 1; i >= 0; --i) {
|
|
1129
|
+
const attribute = attributes[i];
|
|
1130
|
+
const name = attribute && attribute.name;
|
|
1131
|
+
if (typeof name === 'string') {
|
|
1132
|
+
try {
|
|
1133
|
+
root.removeAttribute(name);
|
|
1134
|
+
} catch (_) {
|
|
1135
|
+
/* Clobbered removeAttribute — ignore (fail-closed best effort) */
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
943
1139
|
}
|
|
944
1140
|
};
|
|
945
1141
|
/**
|
|
@@ -974,6 +1170,72 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
974
1170
|
}
|
|
975
1171
|
}
|
|
976
1172
|
};
|
|
1173
|
+
/**
|
|
1174
|
+
* _stripDisallowedAttributes
|
|
1175
|
+
*
|
|
1176
|
+
* Removes every attribute the active configuration does not allow from a
|
|
1177
|
+
* single element, using the same allowlist as the main attribute pass (so
|
|
1178
|
+
* `on*` handlers go, but no `/^on/` blocklist is introduced). Used only to
|
|
1179
|
+
* neutralise nodes that are being discarded from an in-place tree.
|
|
1180
|
+
*
|
|
1181
|
+
* @param element the element to strip
|
|
1182
|
+
*/
|
|
1183
|
+
const _stripDisallowedAttributes = function _stripDisallowedAttributes(element) {
|
|
1184
|
+
const attributes = getAttributes(element);
|
|
1185
|
+
if (!attributes) {
|
|
1186
|
+
return;
|
|
1187
|
+
}
|
|
1188
|
+
for (let i = attributes.length - 1; i >= 0; --i) {
|
|
1189
|
+
const attribute = attributes[i];
|
|
1190
|
+
const name = attribute && attribute.name;
|
|
1191
|
+
if (typeof name !== 'string' || ALLOWED_ATTR[transformCaseFunc(name)]) {
|
|
1192
|
+
continue;
|
|
1193
|
+
}
|
|
1194
|
+
try {
|
|
1195
|
+
element.removeAttribute(name);
|
|
1196
|
+
} catch (_) {
|
|
1197
|
+
/* Clobbered removeAttribute on a doomed node — ignore */
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
};
|
|
1201
|
+
/**
|
|
1202
|
+
* _neutralizeSubtree
|
|
1203
|
+
*
|
|
1204
|
+
* Completes the audit-5 F1 fix across every removal path. The KEEP_CONTENT
|
|
1205
|
+
* move-hoist neutralises only disallowed-tag removals; clobber, mXSS-canary,
|
|
1206
|
+
* namespace, comment, processing-instruction and KEEP_CONTENT:false removals
|
|
1207
|
+
* all drop their subtree wholesale via `_forceRemove`. On the IN_PLACE path
|
|
1208
|
+
* those dropped nodes are detached from the caller's LIVE tree but a
|
|
1209
|
+
* handler-bearing original among them (an `<img onerror>`/`<video>` that was
|
|
1210
|
+
* loading) keeps its queued resource event, which fires in page scope after
|
|
1211
|
+
* sanitize returns. This walks a removed subtree and strips every attribute
|
|
1212
|
+
* the active configuration does not allow — so `on*` handlers are cancelled
|
|
1213
|
+
* through the SAME allowlist that governs kept nodes, not a separate `/^on/`
|
|
1214
|
+
* blocklist. Run synchronously before sanitize returns, i.e. before any
|
|
1215
|
+
* queued event can fire. Hook-free by design: these nodes leave the output,
|
|
1216
|
+
* so firing attribute hooks for them would be surprising. Clobber-safe reads;
|
|
1217
|
+
* a doomed clobbered node may shadow `removeAttribute` (its own attributes are
|
|
1218
|
+
* irrelevant — it is discarded — while its non-clobbered descendants, e.g.
|
|
1219
|
+
* the `<img>`, are reached and scrubbed).
|
|
1220
|
+
*
|
|
1221
|
+
* @param root the root of a removed subtree to neutralise
|
|
1222
|
+
*/
|
|
1223
|
+
const _neutralizeSubtree = function _neutralizeSubtree(root) {
|
|
1224
|
+
const stack = [root];
|
|
1225
|
+
while (stack.length > 0) {
|
|
1226
|
+
const node = stack.pop();
|
|
1227
|
+
const nodeType = getNodeType ? getNodeType(node) : node.nodeType;
|
|
1228
|
+
if (nodeType === NODE_TYPE.element) {
|
|
1229
|
+
_stripDisallowedAttributes(node);
|
|
1230
|
+
}
|
|
1231
|
+
const childNodes = getChildNodes(node);
|
|
1232
|
+
if (childNodes) {
|
|
1233
|
+
for (let i = childNodes.length - 1; i >= 0; --i) {
|
|
1234
|
+
stack.push(childNodes[i]);
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
};
|
|
977
1239
|
/**
|
|
978
1240
|
* _initDocument
|
|
979
1241
|
*
|
|
@@ -1035,6 +1297,20 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
1035
1297
|
// eslint-disable-next-line no-bitwise
|
|
1036
1298
|
NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);
|
|
1037
1299
|
};
|
|
1300
|
+
/**
|
|
1301
|
+
* Replace template expression syntax (mustache, ERB, template
|
|
1302
|
+
* literal) with a space; shared by all SAFE_FOR_TEMPLATES scrub
|
|
1303
|
+
* sites. Order matters: mustache, then ERB, then template literal.
|
|
1304
|
+
*
|
|
1305
|
+
* @param value the string to scrub
|
|
1306
|
+
* @returns the scrubbed string
|
|
1307
|
+
*/
|
|
1308
|
+
const _stripTemplateExpressions = function _stripTemplateExpressions(value) {
|
|
1309
|
+
value = stringReplace(value, MUSTACHE_EXPR$1, ' ');
|
|
1310
|
+
value = stringReplace(value, ERB_EXPR$1, ' ');
|
|
1311
|
+
value = stringReplace(value, TMPLIT_EXPR$1, ' ');
|
|
1312
|
+
return value;
|
|
1313
|
+
};
|
|
1038
1314
|
/**
|
|
1039
1315
|
* Strip template-engine expressions ({{...}}, ${...}, <%...%>) from the
|
|
1040
1316
|
* character data of an element subtree. Used as the final safety net for
|
|
@@ -1055,29 +1331,27 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
1055
1331
|
* @param node The root element whose character data should be scrubbed.
|
|
1056
1332
|
*/
|
|
1057
1333
|
const _scrubTemplateExpressions2 = function _scrubTemplateExpressions(node) {
|
|
1058
|
-
var _node$querySelectorAl
|
|
1334
|
+
var _node$querySelectorAl;
|
|
1059
1335
|
node.normalize();
|
|
1060
1336
|
const walker = createNodeIterator.call(node.ownerDocument || node, node,
|
|
1061
1337
|
// eslint-disable-next-line no-bitwise
|
|
1062
1338
|
NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION, null);
|
|
1063
1339
|
let currentNode = walker.nextNode();
|
|
1064
1340
|
while (currentNode) {
|
|
1065
|
-
|
|
1066
|
-
arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], expr => {
|
|
1067
|
-
data = stringReplace(data, expr, ' ');
|
|
1068
|
-
});
|
|
1069
|
-
currentNode.data = data;
|
|
1341
|
+
currentNode.data = _stripTemplateExpressions(currentNode.data);
|
|
1070
1342
|
currentNode = walker.nextNode();
|
|
1071
1343
|
}
|
|
1072
1344
|
// NodeIterator does not descend into <template>.content per the DOM spec,
|
|
1073
1345
|
// so we must explicitly recurse into each template's content fragment,
|
|
1074
1346
|
// mirroring the approach used by _sanitizeShadowDOM.
|
|
1075
|
-
const templates = (_node$querySelectorAl =
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1347
|
+
const templates = (_node$querySelectorAl = node.querySelectorAll) === null || _node$querySelectorAl === void 0 ? void 0 : _node$querySelectorAl.call(node, 'template');
|
|
1348
|
+
if (templates) {
|
|
1349
|
+
arrayForEach(templates, tmpl => {
|
|
1350
|
+
if (_isDocumentFragment(tmpl.content)) {
|
|
1351
|
+
_scrubTemplateExpressions2(tmpl.content);
|
|
1352
|
+
}
|
|
1353
|
+
});
|
|
1354
|
+
}
|
|
1081
1355
|
};
|
|
1082
1356
|
/**
|
|
1083
1357
|
* _isClobbered
|
|
@@ -1173,10 +1447,104 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
1173
1447
|
}
|
|
1174
1448
|
};
|
|
1175
1449
|
function _executeHooks(hooks, currentNode, data) {
|
|
1450
|
+
if (hooks.length === 0) {
|
|
1451
|
+
return;
|
|
1452
|
+
}
|
|
1176
1453
|
arrayForEach(hooks, hook => {
|
|
1177
1454
|
hook.call(DOMPurify, currentNode, data, CONFIG);
|
|
1178
1455
|
});
|
|
1179
1456
|
}
|
|
1457
|
+
/**
|
|
1458
|
+
* Structural-threat checks that condemn a node regardless of the
|
|
1459
|
+
* allowlists: mXSS via namespace confusion, risky CSS construction,
|
|
1460
|
+
* processing instructions, markup-bearing comments. Pure predicate;
|
|
1461
|
+
* the caller removes. Check order is load-bearing.
|
|
1462
|
+
*
|
|
1463
|
+
* @param currentNode the node to inspect
|
|
1464
|
+
* @param tagName the node's transformCaseFunc'd tag name
|
|
1465
|
+
* @return true if the node must be removed
|
|
1466
|
+
*/
|
|
1467
|
+
const _isUnsafeNode = function _isUnsafeNode(currentNode, tagName) {
|
|
1468
|
+
/* Detect mXSS attempts abusing namespace confusion */
|
|
1469
|
+
if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.innerHTML)) {
|
|
1470
|
+
return true;
|
|
1471
|
+
}
|
|
1472
|
+
/* Remove risky CSS construction leading to mXSS */
|
|
1473
|
+
if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === 'style' && _isNode(currentNode.firstElementChild)) {
|
|
1474
|
+
return true;
|
|
1475
|
+
}
|
|
1476
|
+
/* Remove any occurrence of processing instructions */
|
|
1477
|
+
if (currentNode.nodeType === NODE_TYPE.processingInstruction) {
|
|
1478
|
+
return true;
|
|
1479
|
+
}
|
|
1480
|
+
/* Remove any kind of possibly harmful comments */
|
|
1481
|
+
if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, currentNode.data)) {
|
|
1482
|
+
return true;
|
|
1483
|
+
}
|
|
1484
|
+
return false;
|
|
1485
|
+
};
|
|
1486
|
+
/**
|
|
1487
|
+
* Handle a node whose tag is forbidden or not allowlisted: keep
|
|
1488
|
+
* allowed custom elements (false return exits _sanitizeElements
|
|
1489
|
+
* early - namespace/fallback checks and the afterSanitizeElements
|
|
1490
|
+
* hook are intentionally skipped for kept custom elements), else
|
|
1491
|
+
* hoist content per KEEP_CONTENT and remove.
|
|
1492
|
+
*
|
|
1493
|
+
* @param currentNode the disallowed node
|
|
1494
|
+
* @param tagName the node's transformCaseFunc'd tag name
|
|
1495
|
+
* @return true if the node was removed, false if kept
|
|
1496
|
+
*/
|
|
1497
|
+
const _sanitizeDisallowedNode = function _sanitizeDisallowedNode(currentNode, tagName) {
|
|
1498
|
+
/* Check if we have a custom element to handle */
|
|
1499
|
+
if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
|
|
1500
|
+
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
|
|
1501
|
+
return false;
|
|
1502
|
+
}
|
|
1503
|
+
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {
|
|
1504
|
+
return false;
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
/* Keep content except for bad-listed elements.
|
|
1508
|
+
Use the cached prototype getters exclusively — the previous code
|
|
1509
|
+
had `|| currentNode.parentNode` / `|| currentNode.childNodes`
|
|
1510
|
+
fallbacks, but the cached getters always return the canonical
|
|
1511
|
+
value (or null for a real parent-less node), so the fallback
|
|
1512
|
+
path was dead in safe cases and a clobbering surface in unsafe
|
|
1513
|
+
ones. Falsy cached results stay falsy; the `if (childNodes &&
|
|
1514
|
+
parentNode)` check already gates correctly. */
|
|
1515
|
+
if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
|
|
1516
|
+
const parentNode = getParentNode(currentNode);
|
|
1517
|
+
const childNodes = getChildNodes(currentNode);
|
|
1518
|
+
if (childNodes && parentNode) {
|
|
1519
|
+
const childCount = childNodes.length;
|
|
1520
|
+
/* In-place: hoist the *original* children so the iterator visits
|
|
1521
|
+
and sanitises them through the same allowlist pass as every other
|
|
1522
|
+
node. The caller built the tree in the live document, so the
|
|
1523
|
+
originals carry already-queued resource events (`<img onerror>`,
|
|
1524
|
+
`<video>`/`<audio>` error, lazy/`onload`, …); cloning would leave
|
|
1525
|
+
those originals detached but still armed, firing in page scope
|
|
1526
|
+
while the returned tree looked clean. Moving is safe in-place: the
|
|
1527
|
+
root is pre-validated as an allowed tag and so is never the node
|
|
1528
|
+
being removed, which keeps `parentNode` inside the iterator root
|
|
1529
|
+
and the relocated child inside the serialised tree.
|
|
1530
|
+
Otherwise (string / DOM-copy paths): clone. The iterator is rooted
|
|
1531
|
+
at — and the result serialised from — `body`, so a restrictive
|
|
1532
|
+
ALLOWED_TAGS that removes `body` itself must leave its content in
|
|
1533
|
+
place, which only cloning does; and those paths parse into an
|
|
1534
|
+
inert document, so their discarded originals never had a queued
|
|
1535
|
+
event to neutralise.
|
|
1536
|
+
`childNodes` is live; a tail-to-head walk keeps `childNodes[i]`
|
|
1537
|
+
valid whether we move (drops the trailing entry) or clone (leaves
|
|
1538
|
+
the list intact). */
|
|
1539
|
+
for (let i = childCount - 1; i >= 0; --i) {
|
|
1540
|
+
const hoisted = IN_PLACE ? childNodes[i] : cloneNode(childNodes[i], true);
|
|
1541
|
+
parentNode.insertBefore(hoisted, getNextSibling(currentNode));
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
_forceRemove(currentNode);
|
|
1546
|
+
return true;
|
|
1547
|
+
};
|
|
1180
1548
|
/**
|
|
1181
1549
|
* _sanitizeElements
|
|
1182
1550
|
*
|
|
@@ -1187,7 +1555,6 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
1187
1555
|
* @return true if node was killed, false if left alive
|
|
1188
1556
|
*/
|
|
1189
1557
|
const _sanitizeElements = function _sanitizeElements(currentNode) {
|
|
1190
|
-
let content = null;
|
|
1191
1558
|
/* Execute a hook if present */
|
|
1192
1559
|
_executeHooks(hooks.beforeSanitizeElements, currentNode, null);
|
|
1193
1560
|
/* Check if element is clobbered or can clobber */
|
|
@@ -1202,58 +1569,14 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
1202
1569
|
tagName,
|
|
1203
1570
|
allowedTags: ALLOWED_TAGS
|
|
1204
1571
|
});
|
|
1205
|
-
/*
|
|
1206
|
-
if (
|
|
1207
|
-
_forceRemove(currentNode);
|
|
1208
|
-
return true;
|
|
1209
|
-
}
|
|
1210
|
-
/* Remove risky CSS construction leading to mXSS */
|
|
1211
|
-
if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === 'style' && _isNode(currentNode.firstElementChild)) {
|
|
1212
|
-
_forceRemove(currentNode);
|
|
1213
|
-
return true;
|
|
1214
|
-
}
|
|
1215
|
-
/* Remove any occurrence of processing instructions */
|
|
1216
|
-
if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
|
|
1217
|
-
_forceRemove(currentNode);
|
|
1218
|
-
return true;
|
|
1219
|
-
}
|
|
1220
|
-
/* Remove any kind of possibly harmful comments */
|
|
1221
|
-
if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
|
|
1572
|
+
/* Remove mXSS vectors, processing instructions and risky comments */
|
|
1573
|
+
if (_isUnsafeNode(currentNode, tagName)) {
|
|
1222
1574
|
_forceRemove(currentNode);
|
|
1223
1575
|
return true;
|
|
1224
1576
|
}
|
|
1225
1577
|
/* Remove element if anything forbids its presence */
|
|
1226
1578
|
if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {
|
|
1227
|
-
|
|
1228
|
-
if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
|
|
1229
|
-
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
|
|
1230
|
-
return false;
|
|
1231
|
-
}
|
|
1232
|
-
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {
|
|
1233
|
-
return false;
|
|
1234
|
-
}
|
|
1235
|
-
}
|
|
1236
|
-
/* Keep content except for bad-listed elements.
|
|
1237
|
-
Use the cached prototype getters exclusively — the previous code
|
|
1238
|
-
had `|| currentNode.parentNode` / `|| currentNode.childNodes`
|
|
1239
|
-
fallbacks, but the cached getters always return the canonical
|
|
1240
|
-
value (or null for a real parent-less node), so the fallback
|
|
1241
|
-
path was dead in safe cases and a clobbering surface in unsafe
|
|
1242
|
-
ones. Falsy cached results stay falsy; the `if (childNodes &&
|
|
1243
|
-
parentNode)` check already gates correctly. */
|
|
1244
|
-
if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
|
|
1245
|
-
const parentNode = getParentNode(currentNode);
|
|
1246
|
-
const childNodes = getChildNodes(currentNode);
|
|
1247
|
-
if (childNodes && parentNode) {
|
|
1248
|
-
const childCount = childNodes.length;
|
|
1249
|
-
for (let i = childCount - 1; i >= 0; --i) {
|
|
1250
|
-
const childClone = cloneNode(childNodes[i], true);
|
|
1251
|
-
parentNode.insertBefore(childClone, getNextSibling(currentNode));
|
|
1252
|
-
}
|
|
1253
|
-
}
|
|
1254
|
-
}
|
|
1255
|
-
_forceRemove(currentNode);
|
|
1256
|
-
return true;
|
|
1579
|
+
return _sanitizeDisallowedNode(currentNode, tagName);
|
|
1257
1580
|
}
|
|
1258
1581
|
/* Check whether element has a valid namespace.
|
|
1259
1582
|
Realm-safe check (GHSA-hpcv-96wg-7vj8): use the cached Node.prototype
|
|
@@ -1267,17 +1590,14 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
1267
1590
|
return true;
|
|
1268
1591
|
}
|
|
1269
1592
|
/* Make sure that older browsers don't get fallback-tag mXSS */
|
|
1270
|
-
if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(
|
|
1593
|
+
if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(FALLBACK_TAG_CLOSE, currentNode.innerHTML)) {
|
|
1271
1594
|
_forceRemove(currentNode);
|
|
1272
1595
|
return true;
|
|
1273
1596
|
}
|
|
1274
1597
|
/* Sanitize element content to be template-safe */
|
|
1275
1598
|
if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
|
|
1276
1599
|
/* Get the element's text content */
|
|
1277
|
-
content = currentNode.textContent;
|
|
1278
|
-
arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], expr => {
|
|
1279
|
-
content = stringReplace(content, expr, ' ');
|
|
1280
|
-
});
|
|
1600
|
+
const content = _stripTemplateExpressions(currentNode.textContent);
|
|
1281
1601
|
if (currentNode.textContent !== content) {
|
|
1282
1602
|
arrayPush(DOMPurify.removed, {
|
|
1283
1603
|
element: currentNode.cloneNode()
|
|
@@ -1312,7 +1632,7 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
1312
1632
|
(https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
|
|
1313
1633
|
XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
|
|
1314
1634
|
We don't need to check the value; it's always URI safe. */
|
|
1315
|
-
if (ALLOW_DATA_ATTR &&
|
|
1635
|
+
if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$1, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) ; else if (!nameIsPermitted) {
|
|
1316
1636
|
if (
|
|
1317
1637
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
1318
1638
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
@@ -1344,6 +1664,63 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
1344
1664
|
const _isBasicCustomElement = function _isBasicCustomElement(tagName) {
|
|
1345
1665
|
return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);
|
|
1346
1666
|
};
|
|
1667
|
+
/**
|
|
1668
|
+
* Wrap an attribute value in the matching Trusted Types object when
|
|
1669
|
+
* the active policy requires it. Namespaced attributes pass through
|
|
1670
|
+
* unchanged (no TT support yet, see
|
|
1671
|
+
* https://bugs.chromium.org/p/chromium/issues/detail?id=1305293).
|
|
1672
|
+
*
|
|
1673
|
+
* @param lcTag lowercase tag name of the containing element
|
|
1674
|
+
* @param lcName lowercase attribute name
|
|
1675
|
+
* @param namespaceURI the attribute's namespace, if any
|
|
1676
|
+
* @param value the attribute value to wrap
|
|
1677
|
+
* @return the value, wrapped when Trusted Types demand it
|
|
1678
|
+
*/
|
|
1679
|
+
const _applyTrustedTypesToAttribute = function _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value) {
|
|
1680
|
+
if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function' && !namespaceURI) {
|
|
1681
|
+
switch (trustedTypes.getAttributeType(lcTag, lcName)) {
|
|
1682
|
+
case 'TrustedHTML':
|
|
1683
|
+
{
|
|
1684
|
+
return _createTrustedHTML(value);
|
|
1685
|
+
}
|
|
1686
|
+
case 'TrustedScriptURL':
|
|
1687
|
+
{
|
|
1688
|
+
return _createTrustedScriptURL(value);
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
return value;
|
|
1693
|
+
};
|
|
1694
|
+
/**
|
|
1695
|
+
* Write a modified attribute value back onto the element. On
|
|
1696
|
+
* success, re-probe for clobbering introduced by the new value and
|
|
1697
|
+
* remove the element when found; otherwise pop the removal entry
|
|
1698
|
+
* recorded by the earlier _removeAttribute (long-standing pairing
|
|
1699
|
+
* with the SANITIZE_NAMED_PROPS path - do not "fix" casually). On
|
|
1700
|
+
* failure, remove the attribute instead.
|
|
1701
|
+
*
|
|
1702
|
+
* @param currentNode the element carrying the attribute
|
|
1703
|
+
* @param name the attribute name as present on the element
|
|
1704
|
+
* @param namespaceURI the attribute's namespace, if any
|
|
1705
|
+
* @param value the new attribute value
|
|
1706
|
+
*/
|
|
1707
|
+
const _setAttributeValue = function _setAttributeValue(currentNode, name, namespaceURI, value) {
|
|
1708
|
+
try {
|
|
1709
|
+
if (namespaceURI) {
|
|
1710
|
+
currentNode.setAttributeNS(namespaceURI, name, value);
|
|
1711
|
+
} else {
|
|
1712
|
+
/* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
|
|
1713
|
+
currentNode.setAttribute(name, value);
|
|
1714
|
+
}
|
|
1715
|
+
if (_isClobbered(currentNode)) {
|
|
1716
|
+
_forceRemove(currentNode);
|
|
1717
|
+
} else {
|
|
1718
|
+
arrayPop(DOMPurify.removed);
|
|
1719
|
+
}
|
|
1720
|
+
} catch (_) {
|
|
1721
|
+
_removeAttribute(name, currentNode);
|
|
1722
|
+
}
|
|
1723
|
+
};
|
|
1347
1724
|
/**
|
|
1348
1725
|
* _sanitizeAttributes
|
|
1349
1726
|
*
|
|
@@ -1370,6 +1747,7 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
1370
1747
|
forceKeepAttr: undefined
|
|
1371
1748
|
};
|
|
1372
1749
|
let l = attributes.length;
|
|
1750
|
+
const lcTag = transformCaseFunc(currentNode.nodeName);
|
|
1373
1751
|
/* Go backwards over all attributes; safely remove bad ones */
|
|
1374
1752
|
while (l--) {
|
|
1375
1753
|
const attr = attributes[l];
|
|
@@ -1407,7 +1785,7 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
1407
1785
|
_removeAttribute(name, currentNode);
|
|
1408
1786
|
continue;
|
|
1409
1787
|
}
|
|
1410
|
-
/* Did the hooks
|
|
1788
|
+
/* Did the hooks force-keep the attribute? */
|
|
1411
1789
|
if (hookEvent.forceKeepAttr) {
|
|
1412
1790
|
continue;
|
|
1413
1791
|
}
|
|
@@ -1417,56 +1795,24 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
1417
1795
|
continue;
|
|
1418
1796
|
}
|
|
1419
1797
|
/* Work around a security issue in jQuery 3.0 */
|
|
1420
|
-
if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(
|
|
1798
|
+
if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value)) {
|
|
1421
1799
|
_removeAttribute(name, currentNode);
|
|
1422
1800
|
continue;
|
|
1423
1801
|
}
|
|
1424
1802
|
/* Sanitize attribute content to be template-safe */
|
|
1425
1803
|
if (SAFE_FOR_TEMPLATES) {
|
|
1426
|
-
|
|
1427
|
-
value = stringReplace(value, expr, ' ');
|
|
1428
|
-
});
|
|
1804
|
+
value = _stripTemplateExpressions(value);
|
|
1429
1805
|
}
|
|
1430
1806
|
/* Is `value` valid for this attribute? */
|
|
1431
|
-
const lcTag = transformCaseFunc(currentNode.nodeName);
|
|
1432
1807
|
if (!_isValidAttribute(lcTag, lcName, value)) {
|
|
1433
1808
|
_removeAttribute(name, currentNode);
|
|
1434
1809
|
continue;
|
|
1435
1810
|
}
|
|
1436
1811
|
/* Handle attributes that require Trusted Types */
|
|
1437
|
-
|
|
1438
|
-
if (namespaceURI) ; else {
|
|
1439
|
-
switch (trustedTypes.getAttributeType(lcTag, lcName)) {
|
|
1440
|
-
case 'TrustedHTML':
|
|
1441
|
-
{
|
|
1442
|
-
value = _createTrustedHTML(value);
|
|
1443
|
-
break;
|
|
1444
|
-
}
|
|
1445
|
-
case 'TrustedScriptURL':
|
|
1446
|
-
{
|
|
1447
|
-
value = trustedTypesPolicy.createScriptURL(value);
|
|
1448
|
-
break;
|
|
1449
|
-
}
|
|
1450
|
-
}
|
|
1451
|
-
}
|
|
1452
|
-
}
|
|
1812
|
+
value = _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value);
|
|
1453
1813
|
/* Handle invalid data-* attribute set by try-catching it */
|
|
1454
1814
|
if (value !== initValue) {
|
|
1455
|
-
|
|
1456
|
-
if (namespaceURI) {
|
|
1457
|
-
currentNode.setAttributeNS(namespaceURI, name, value);
|
|
1458
|
-
} else {
|
|
1459
|
-
/* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
|
|
1460
|
-
currentNode.setAttribute(name, value);
|
|
1461
|
-
}
|
|
1462
|
-
if (_isClobbered(currentNode)) {
|
|
1463
|
-
_forceRemove(currentNode);
|
|
1464
|
-
} else {
|
|
1465
|
-
arrayPop(DOMPurify.removed);
|
|
1466
|
-
}
|
|
1467
|
-
} catch (_) {
|
|
1468
|
-
_removeAttribute(name, currentNode);
|
|
1469
|
-
}
|
|
1815
|
+
_setAttributeValue(currentNode, name, namespaceURI, value);
|
|
1470
1816
|
}
|
|
1471
1817
|
}
|
|
1472
1818
|
/* Execute a hook if present */
|
|
@@ -1508,9 +1854,9 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
1508
1854
|
iterator also surfaces. */
|
|
1509
1855
|
const shadowNodeType = getNodeType ? getNodeType(shadowNode) : shadowNode.nodeType;
|
|
1510
1856
|
if (shadowNodeType === NODE_TYPE.element) {
|
|
1511
|
-
const innerSr = getShadowRoot
|
|
1857
|
+
const innerSr = getShadowRoot(shadowNode);
|
|
1512
1858
|
if (_isDocumentFragment(innerSr)) {
|
|
1513
|
-
|
|
1859
|
+
_sanitizeAttachedShadowRoots(innerSr);
|
|
1514
1860
|
_sanitizeShadowDOM2(innerSr);
|
|
1515
1861
|
}
|
|
1516
1862
|
}
|
|
@@ -1537,46 +1883,81 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
1537
1883
|
*
|
|
1538
1884
|
* @param root the subtree root to walk for attached shadow roots
|
|
1539
1885
|
*/
|
|
1540
|
-
const
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1886
|
+
const _sanitizeAttachedShadowRoots = function _sanitizeAttachedShadowRoots(root) {
|
|
1887
|
+
/* Iterative (explicit stack) rather than per-child recursion. DOM APIs
|
|
1888
|
+
impose no depth cap, so an attacker-shaped tree (JSON/CRDT/editor data
|
|
1889
|
+
built straight into the DOM — the IN_PLACE surface) deeper than the JS
|
|
1890
|
+
call-stack budget would otherwise overflow native recursion here and
|
|
1891
|
+
throw at the IN_PLACE entry pre-pass, before a single node is
|
|
1892
|
+
sanitized, leaving the caller's live tree untouched (fail-open). See
|
|
1893
|
+
campaign-3 F4. A heap stack keeps depth off the call stack.
|
|
1894
|
+
Each work item is either a node to descend into, or a deferred
|
|
1895
|
+
`_sanitizeShadowDOM` for an already-walked shadow root. The deferred
|
|
1896
|
+
form preserves the original post-order discipline: a shadow root's
|
|
1897
|
+
nested shadow roots are discovered before the outer shadow is
|
|
1898
|
+
sanitized (which may remove hosts). Pushes are in reverse of the
|
|
1899
|
+
desired processing order (LIFO): template content, then children, then
|
|
1900
|
+
the shadow-sanitize, then the shadow walk — so the order matches the
|
|
1901
|
+
previous recursion exactly. */
|
|
1902
|
+
const stack = [{
|
|
1903
|
+
node: root,
|
|
1904
|
+
shadow: null
|
|
1905
|
+
}];
|
|
1906
|
+
while (stack.length > 0) {
|
|
1907
|
+
const item = stack.pop();
|
|
1908
|
+
/* Deferred shadow-DOM sanitisation: runs after its subtree was walked. */
|
|
1909
|
+
if (item.shadow) {
|
|
1910
|
+
_sanitizeShadowDOM2(item.shadow);
|
|
1911
|
+
continue;
|
|
1912
|
+
}
|
|
1913
|
+
const node = item.node;
|
|
1914
|
+
const nodeType = getNodeType ? getNodeType(node) : node.nodeType;
|
|
1915
|
+
const isElement = nodeType === NODE_TYPE.element;
|
|
1916
|
+
/* (pushed last → processed first) Children, snapshotted in reverse so
|
|
1917
|
+
the first child is processed first. Snapshotting matters because a
|
|
1918
|
+
hook may detach siblings mid-walk. */
|
|
1919
|
+
const childNodes = getChildNodes(node);
|
|
1920
|
+
if (childNodes) {
|
|
1921
|
+
for (let i = childNodes.length - 1; i >= 0; --i) {
|
|
1922
|
+
stack.push({
|
|
1923
|
+
node: childNodes[i],
|
|
1924
|
+
shadow: null
|
|
1925
|
+
});
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
/* (pushed before children → processed after them, matching the old
|
|
1929
|
+
"template content last" order) When the node is a <template>,
|
|
1930
|
+
descend into its content. */
|
|
1931
|
+
if (isElement) {
|
|
1932
|
+
const rootName = getNodeName ? getNodeName(node) : null;
|
|
1933
|
+
if (typeof rootName === 'string' && transformCaseFunc(rootName) === 'template') {
|
|
1934
|
+
const content = node.content;
|
|
1935
|
+
if (_isDocumentFragment(content)) {
|
|
1936
|
+
stack.push({
|
|
1937
|
+
node: content,
|
|
1938
|
+
shadow: null
|
|
1939
|
+
});
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
/* Shadow root (processed first): walk its subtree, then sanitise it.
|
|
1944
|
+
Realm-safe check (GHSA-hpcv-96wg-7vj8): nodeType-based detection
|
|
1945
|
+
rather than `instanceof DocumentFragment`, which is realm-bound and
|
|
1946
|
+
silently skipped foreign-realm shadow roots (e.g.
|
|
1947
|
+
iframe.contentDocument attachShadow). */
|
|
1948
|
+
if (isElement) {
|
|
1949
|
+
const sr = getShadowRoot(node);
|
|
1950
|
+
if (_isDocumentFragment(sr)) {
|
|
1951
|
+
/* Push the deferred sanitise first so it pops after the shadow
|
|
1952
|
+
walk we push next, i.e. nested shadow roots are discovered
|
|
1953
|
+
before this one is sanitised. */
|
|
1954
|
+
stack.push({
|
|
1955
|
+
node: null,
|
|
1956
|
+
shadow: sr
|
|
1957
|
+
}, {
|
|
1958
|
+
node: sr,
|
|
1959
|
+
shadow: null
|
|
1960
|
+
});
|
|
1580
1961
|
}
|
|
1581
1962
|
}
|
|
1582
1963
|
}
|
|
@@ -1607,16 +1988,41 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
1607
1988
|
return dirty;
|
|
1608
1989
|
}
|
|
1609
1990
|
/* Assign config vars */
|
|
1610
|
-
if (
|
|
1991
|
+
if (SET_CONFIG) {
|
|
1992
|
+
/* Persistent setConfig() path: _parseConfig is skipped, so the sets are
|
|
1993
|
+
* not re-derived per call. Restore them from the pristine bindings
|
|
1994
|
+
* captured at setConfig() time so a previous call's hook clone (mutated
|
|
1995
|
+
* below) does not carry over. */
|
|
1996
|
+
ALLOWED_TAGS = SET_CONFIG_ALLOWED_TAGS;
|
|
1997
|
+
ALLOWED_ATTR = SET_CONFIG_ALLOWED_ATTR;
|
|
1998
|
+
} else {
|
|
1611
1999
|
_parseConfig(cfg);
|
|
1612
2000
|
}
|
|
2001
|
+
/* Clone the hook-mutable allowlists before the walk whenever an
|
|
2002
|
+
* uponSanitize* hook is registered. The hook event exposes ALLOWED_TAGS
|
|
2003
|
+
* and ALLOWED_ATTR by reference (as allowedTags / allowedAttributes), so
|
|
2004
|
+
* a hook that widens them would otherwise mutate the shared set
|
|
2005
|
+
* permanently: across later calls and across every element. Cloning per
|
|
2006
|
+
* walk keeps documented in-call widening working while scoping it to the
|
|
2007
|
+
* call. A single guard for both config paths - the per-call path rebinds
|
|
2008
|
+
* the sets in _parseConfig each call, the persistent path restores them
|
|
2009
|
+
* from the captured bindings just above - so the two cannot diverge. */
|
|
2010
|
+
if (hooks.uponSanitizeElement.length > 0 || hooks.uponSanitizeAttribute.length > 0) {
|
|
2011
|
+
ALLOWED_TAGS = clone(ALLOWED_TAGS);
|
|
2012
|
+
}
|
|
2013
|
+
if (hooks.uponSanitizeAttribute.length > 0) {
|
|
2014
|
+
ALLOWED_ATTR = clone(ALLOWED_ATTR);
|
|
2015
|
+
}
|
|
1613
2016
|
/* Clean up removed elements */
|
|
1614
2017
|
DOMPurify.removed = [];
|
|
1615
|
-
/*
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
2018
|
+
/* Resolve IN_PLACE for this call without mutating persistent config.
|
|
2019
|
+
Writing the IN_PLACE closure variable here leaks under setConfig(),
|
|
2020
|
+
where _parseConfig is skipped on later calls: a single string call would
|
|
2021
|
+
disable in-place mode for every subsequent node call, returning a
|
|
2022
|
+
sanitized copy while leaving the caller's node — which in-place callers
|
|
2023
|
+
keep using and whose return value they ignore — unsanitized. REPORT-2. */
|
|
2024
|
+
const inPlace = IN_PLACE && typeof dirty !== 'string' && _isNode(dirty);
|
|
2025
|
+
if (inPlace) {
|
|
1620
2026
|
/* Do some early pre-sanitization to avoid unsafe root nodes.
|
|
1621
2027
|
Read nodeName through the cached prototype getter — a clobbering
|
|
1622
2028
|
child named "nodeName" on the form root would otherwise shadow
|
|
@@ -1643,8 +2049,16 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
1643
2049
|
throw typeErrorCreate('root node is clobbered and cannot be sanitized in-place');
|
|
1644
2050
|
}
|
|
1645
2051
|
/* Sanitize attached shadow roots before the main iterator runs.
|
|
1646
|
-
The iterator does not descend into shadow trees.
|
|
1647
|
-
|
|
2052
|
+
The iterator does not descend into shadow trees. Same fail-closed
|
|
2053
|
+
barrier as the main walk (campaign-3 F2): a custom-element reaction
|
|
2054
|
+
inside a shadow root could abort this pre-pass before the walk runs,
|
|
2055
|
+
which would otherwise leave the entire live tree unsanitized. */
|
|
2056
|
+
try {
|
|
2057
|
+
_sanitizeAttachedShadowRoots(dirty);
|
|
2058
|
+
} catch (error) {
|
|
2059
|
+
_neutralizeRoot(dirty);
|
|
2060
|
+
throw error;
|
|
2061
|
+
}
|
|
1648
2062
|
} else if (_isNode(dirty)) {
|
|
1649
2063
|
/* If dirty is a DOM element, append to an empty document to avoid
|
|
1650
2064
|
elements being stripped by the parser */
|
|
@@ -1664,7 +2078,7 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
1664
2078
|
descend into shadow trees. The walk routes every read through a
|
|
1665
2079
|
cached prototype getter so clobbering descendants on a form root
|
|
1666
2080
|
cannot hide a shadow host from this pass. */
|
|
1667
|
-
|
|
2081
|
+
_sanitizeAttachedShadowRoots(importedNode);
|
|
1668
2082
|
} else {
|
|
1669
2083
|
/* Exit directly if we have nothing to do */
|
|
1670
2084
|
if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&
|
|
@@ -1684,23 +2098,50 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
1684
2098
|
_forceRemove(body.firstChild);
|
|
1685
2099
|
}
|
|
1686
2100
|
/* Get node iterator */
|
|
1687
|
-
const nodeIterator = _createNodeIterator(
|
|
1688
|
-
/* Now start iterating over the created document
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
2101
|
+
const nodeIterator = _createNodeIterator(inPlace ? dirty : body);
|
|
2102
|
+
/* Now start iterating over the created document.
|
|
2103
|
+
The walk runs inside an exception barrier (campaign-3 F2): a re-entrant
|
|
2104
|
+
engine/custom-element mutation can detach a node mid-walk so
|
|
2105
|
+
`_forceRemove`'s parentless guard throws, aborting the loop. Without the
|
|
2106
|
+
barrier the caller's in-place tree would be left half-sanitized with the
|
|
2107
|
+
unvisited tail still armed. On any throw we fail closed — strip the
|
|
2108
|
+
in-place root bare — then rethrow so the existing throw contract is
|
|
2109
|
+
preserved. (String/DOM-copy paths never return the partial body, so the
|
|
2110
|
+
propagating throw is already fail-closed there.) */
|
|
2111
|
+
try {
|
|
2112
|
+
while (currentNode = nodeIterator.nextNode()) {
|
|
2113
|
+
/* Sanitize tags and elements */
|
|
2114
|
+
_sanitizeElements(currentNode);
|
|
2115
|
+
/* Check attributes next */
|
|
2116
|
+
_sanitizeAttributes(currentNode);
|
|
2117
|
+
/* Shadow DOM detected, sanitize it.
|
|
2118
|
+
Realm-safe check (GHSA-hpcv-96wg-7vj8): nodeType-based detection
|
|
2119
|
+
instead of instanceof, so foreign-realm <template>.content is
|
|
2120
|
+
walked correctly. */
|
|
2121
|
+
if (_isDocumentFragment(currentNode.content)) {
|
|
2122
|
+
_sanitizeShadowDOM2(currentNode.content);
|
|
2123
|
+
}
|
|
2124
|
+
}
|
|
2125
|
+
} catch (error) {
|
|
2126
|
+
if (inPlace) {
|
|
2127
|
+
_neutralizeRoot(dirty);
|
|
1700
2128
|
}
|
|
2129
|
+
throw error;
|
|
1701
2130
|
}
|
|
1702
2131
|
/* If we sanitized `dirty` in-place, return it. */
|
|
1703
|
-
if (
|
|
2132
|
+
if (inPlace) {
|
|
2133
|
+
/* Fail-closed completion of the audit-5 F1 fix: every node removed from
|
|
2134
|
+
the caller's live tree is detached but may still hold a queued
|
|
2135
|
+
resource-event handler that fires in page scope after we return. The
|
|
2136
|
+
move-hoist covers only disallowed-tag KEEP_CONTENT removals; strip the
|
|
2137
|
+
non-allow-listed attributes off every other removed subtree (clobber,
|
|
2138
|
+
mXSS, namespace, comments, KEEP_CONTENT:false, …) so those handlers are
|
|
2139
|
+
cancelled before any event can fire. Runs synchronously, pre-return. */
|
|
2140
|
+
arrayForEach(DOMPurify.removed, entry => {
|
|
2141
|
+
if (entry.element) {
|
|
2142
|
+
_neutralizeSubtree(entry.element);
|
|
2143
|
+
}
|
|
2144
|
+
});
|
|
1704
2145
|
if (SAFE_FOR_TEMPLATES) {
|
|
1705
2146
|
_scrubTemplateExpressions2(dirty);
|
|
1706
2147
|
}
|
|
@@ -1739,9 +2180,7 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
1739
2180
|
}
|
|
1740
2181
|
/* Sanitize final string template-safe */
|
|
1741
2182
|
if (SAFE_FOR_TEMPLATES) {
|
|
1742
|
-
|
|
1743
|
-
serializedHTML = stringReplace(serializedHTML, expr, ' ');
|
|
1744
|
-
});
|
|
2183
|
+
serializedHTML = _stripTemplateExpressions(serializedHTML);
|
|
1745
2184
|
}
|
|
1746
2185
|
return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(serializedHTML) : serializedHTML;
|
|
1747
2186
|
};
|
|
@@ -1749,10 +2188,20 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
1749
2188
|
let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1750
2189
|
_parseConfig(cfg);
|
|
1751
2190
|
SET_CONFIG = true;
|
|
2191
|
+
SET_CONFIG_ALLOWED_TAGS = ALLOWED_TAGS;
|
|
2192
|
+
SET_CONFIG_ALLOWED_ATTR = ALLOWED_ATTR;
|
|
1752
2193
|
};
|
|
1753
2194
|
DOMPurify.clearConfig = function () {
|
|
1754
2195
|
CONFIG = null;
|
|
1755
2196
|
SET_CONFIG = false;
|
|
2197
|
+
SET_CONFIG_ALLOWED_TAGS = null;
|
|
2198
|
+
SET_CONFIG_ALLOWED_ATTR = null;
|
|
2199
|
+
// Drop any caller-supplied Trusted Types policy so it cannot poison later
|
|
2200
|
+
// `RETURN_TRUSTED_TYPE` output. The internal default policy (cached, and
|
|
2201
|
+
// never recreated — Trusted Types throws on duplicate names) is restored by
|
|
2202
|
+
// the next `_parseConfig`. See GHSA-vxr8-fq34-vvx9.
|
|
2203
|
+
trustedTypesPolicy = defaultTrustedTypesPolicy;
|
|
2204
|
+
emptyHTML = '';
|
|
1756
2205
|
};
|
|
1757
2206
|
DOMPurify.isValidAttribute = function (tag, attr, value) {
|
|
1758
2207
|
/* Initialize shared config vars if necessary. */
|
|
@@ -1767,9 +2216,19 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
1767
2216
|
if (typeof hookFunction !== 'function') {
|
|
1768
2217
|
return;
|
|
1769
2218
|
}
|
|
2219
|
+
/* Reject unknown entry points. Without this, a non-hook key (e.g.
|
|
2220
|
+
* '__proto__') indexes off the prototype chain rather than a real
|
|
2221
|
+
* hook array, and arrayPush then writes to Object.prototype. Guard
|
|
2222
|
+
* with an own-property check against the known hook names. */
|
|
2223
|
+
if (!objectHasOwnProperty(hooks, entryPoint)) {
|
|
2224
|
+
return;
|
|
2225
|
+
}
|
|
1770
2226
|
arrayPush(hooks[entryPoint], hookFunction);
|
|
1771
2227
|
};
|
|
1772
2228
|
DOMPurify.removeHook = function (entryPoint, hookFunction) {
|
|
2229
|
+
if (!objectHasOwnProperty(hooks, entryPoint)) {
|
|
2230
|
+
return undefined;
|
|
2231
|
+
}
|
|
1773
2232
|
if (hookFunction !== undefined) {
|
|
1774
2233
|
const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);
|
|
1775
2234
|
return index === -1 ? undefined : arraySplice(hooks[entryPoint], index, 1)[0];
|
|
@@ -1777,6 +2236,9 @@ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
1777
2236
|
return arrayPop(hooks[entryPoint]);
|
|
1778
2237
|
};
|
|
1779
2238
|
DOMPurify.removeHooks = function (entryPoint) {
|
|
2239
|
+
if (!objectHasOwnProperty(hooks, entryPoint)) {
|
|
2240
|
+
return;
|
|
2241
|
+
}
|
|
1780
2242
|
hooks[entryPoint] = [];
|
|
1781
2243
|
};
|
|
1782
2244
|
DOMPurify.removeAllHooks = function () {
|