Skip to content

Commit

Permalink
[Task] Improve GDPR email search (#14410)
Browse files Browse the repository at this point in the history
* improved email in toolbar

* added validator to email search input
  • Loading branch information
Corepex committed Feb 27, 2023
1 parent 2e28515 commit 4b57332
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Expand Up @@ -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;"
}
Expand Down
Expand Up @@ -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",
Expand Down

0 comments on commit 4b57332

Please sign in to comment.