EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
fix email address escaped
Yurii669e78e072bb
diff --git a/client/src/views/email/fields/from-address-varchar.js b/client/src/views/email/fields/from-address-varchar.jsindex 4ab6cd8d0f..f86c38559f 100644--- a/client/src/views/email/fields/from-address-varchar.js+++ b/client/src/views/email/fields/from-address-varchar.js@@ -385,6 +385,8 @@ class EmailFromAddressVarchar extends BaseFieldView {*/createPerson(scope, address) {const fromString = this.model.get('fromString') || this.model.get('fromName');++ /** @type {string|null} */let name = this.nameHash[address] || null;if (!name && this.name === 'from' && fromString) {@@ -394,7 +396,7 @@ class EmailFromAddressVarchar extends BaseFieldView {}if (name) {- name = this.getHelper().escapeString(name);+ name = EmailFromAddressVarchar.stripQuotesFromName(name);}const attributes = {@@ -465,7 +467,7 @@ class EmailFromAddressVarchar extends BaseFieldView {}if (name) {- name = this.getHelper().escapeString(name);+ name = EmailFromAddressVarchar.stripQuotesFromName(name);}const attributes = {@@ -558,6 +560,19 @@ class EmailFromAddressVarchar extends BaseFieldView {Espo.Ui.notify();}+ /**+ * @private+ * @param {string} name+ * @return {string}+ */+ static stripQuotesFromName(name) {+ if (name && /^(['"]).*\1$/.test(name)) {+ name = name.substring(1, name.length - 1);+ }++ return name;+ }+fetchSearch() {const value = this.$element.val().trim();