@valtimo/components 13.50.0 → 13.50.1

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.
@@ -56,6 +56,7 @@ import { OverlayModule, Overlay } from '@angular/cdk/overlay';
56
56
  import Currency from '@tadashi/currency';
57
57
  import flatpickr from 'flatpickr';
58
58
  import { Dutch } from 'flatpickr/dist/l10n/nl';
59
+ import createDOMPurify from 'dompurify';
59
60
  import * as i2$4 from 'ngx-spinner';
60
61
  import { NgxSpinnerModule } from 'ngx-spinner';
61
62
  import Search16 from '@carbon/icons/es/search/16';
@@ -13103,6 +13104,35 @@ function registerFormioFlatpickr() {
13103
13104
  };
13104
13105
  }
13105
13106
 
13107
+ /*
13108
+ * Copyright 2015-2026 Ritense BV, the Netherlands.
13109
+ *
13110
+ * Licensed under EUPL, Version 1.2 (the "License");
13111
+ * you may not use this file except in compliance with the License.
13112
+ * You may obtain a copy of the License at
13113
+ *
13114
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
13115
+ *
13116
+ * Unless required by applicable law or agreed to in writing, software
13117
+ * distributed under the License is distributed on an "AS IS" basis,
13118
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13119
+ * See the License for the specific language governing permissions and
13120
+ * limitations under the License.
13121
+ */
13122
+ const SANITIZE_CONFIG = {
13123
+ FORBID_TAGS: ['form', 'input', 'button', 'textarea', 'select'],
13124
+ };
13125
+ // Use an isolated DOMPurify instance so the anchor hook below does not leak onto
13126
+ // the shared singleton that formiojs (and other libraries) sanitize with.
13127
+ const purifier = createDOMPurify(window);
13128
+ purifier.addHook('afterSanitizeAttributes', node => {
13129
+ if (node.tagName === 'A') {
13130
+ node.setAttribute('target', '_blank');
13131
+ node.setAttribute('rel', 'noopener noreferrer');
13132
+ }
13133
+ });
13134
+ const sanitizeEmailHtml = (html) => purifier.sanitize(html, SANITIZE_CONFIG);
13135
+
13106
13136
  /*
13107
13137
  * Copyright 2015-2026 Ritense BV, the Netherlands.
13108
13138
  *
@@ -13121,7 +13151,7 @@ function registerFormioFlatpickr() {
13121
13151
  class FormIoMailPreviewComponent {
13122
13152
  set value(v) {
13123
13153
  this._value = v;
13124
- this.safeValue = this.sanitizer.bypassSecurityTrustHtml(v ?? 'Hier wordt het e-mailvoorbeeld getoond.');
13154
+ this.safeValue = this.sanitizer.bypassSecurityTrustHtml(sanitizeEmailHtml(v ?? 'Hier wordt het e-mailvoorbeeld getoond.'));
13125
13155
  }
13126
13156
  get value() {
13127
13157
  return this._value;