diff --git a/bundles/AdminBundle/Resources/public/js/pimcore/settings/gdpr/dataproviders/sentMail.js b/bundles/AdminBundle/Resources/public/js/pimcore/settings/gdpr/dataproviders/sentMail.js index ea4539499f8..62afb48f02e 100644 --- a/bundles/AdminBundle/Resources/public/js/pimcore/settings/gdpr/dataproviders/sentMail.js +++ b/bundles/AdminBundle/Resources/public/js/pimcore/settings/gdpr/dataproviders/sentMail.js @@ -366,7 +366,7 @@ pimcore.settings.gdpr.dataproviders.sentMail = Class.create({ cls: 'pimcore_main_toolbar', items: [ { - text: t("gdpr_dataSource_sentMail_only_email") + ": " + this.searchParams.email, + text: t("gdpr_dataSource_sentMail_only_email") + ": " + Ext.util.Format.htmlEncode(this.searchParams.email), xtype: "tbtext", style: "margin: 0 10px 0 0;" } diff --git a/bundles/AdminBundle/Resources/public/js/pimcore/settings/gdpr/gdprPanel.js b/bundles/AdminBundle/Resources/public/js/pimcore/settings/gdpr/gdprPanel.js index 58f1814415a..fbfecaa1c04 100644 --- a/bundles/AdminBundle/Resources/public/js/pimcore/settings/gdpr/gdprPanel.js +++ b/bundles/AdminBundle/Resources/public/js/pimcore/settings/gdpr/gdprPanel.js @@ -76,7 +76,14 @@ pimcore.settings.gdpr.gdprPanel = Class.create({ xtype: 'textfield', name: 'email', fieldLabel: t("gdpr_data_extractor_label_email"), - width: 650 + width: 650, + validator: function (value) { + if(value !== value.replace(/[^a-zA-Z0-9_\-@.]/g,'')){ + this.setValue(value.replace(/[^a-zA-Z0-9_\-@.]/g,'')); + } + + return true; + } }, { xtype: "button",