From 1068b3cb96b2069b00827ce47375f2422065de7b Mon Sep 17 00:00:00 2001 From: Akhil Narang Date: Fri, 31 Oct 2025 13:18:05 +0530 Subject: [PATCH] Revert "Merge pull request #28914 from samkit5495/patch-1" This reverts commit 22560c36f6bb064486134049b57d6db1f4c573ed, reversing changes made to 7a7b318662a16eefb30698564a14dc98dd7b1327. --- .../public/js/frappe/views/communication.js | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/frappe/public/js/frappe/views/communication.js b/frappe/public/js/frappe/views/communication.js index 12ab9da505..6ffc9edafd 100755 --- a/frappe/public/js/frappe/views/communication.js +++ b/frappe/public/js/frappe/views/communication.js @@ -56,9 +56,6 @@ frappe.views.CommunicationComposer = class { fieldname: "recipients", default: this.get_default_recipients("recipients"), ignore_validation: true, - onchange: function () { - me.sanitize_emails(this); - }, }, { fieldtype: "Button", @@ -79,9 +76,6 @@ frappe.views.CommunicationComposer = class { fieldname: "cc", default: this.get_default_recipients("cc"), ignore_validation: true, - onchange: function () { - me.sanitize_emails(this); - }, }, { label: __("BCC", null, "Email Recipients"), @@ -89,9 +83,6 @@ frappe.views.CommunicationComposer = class { fieldname: "bcc", default: this.get_default_recipients("bcc"), ignore_validation: true, - onchange: function () { - me.sanitize_emails(this); - }, }, { label: __("Schedule Send At"), @@ -986,16 +977,4 @@ frappe.views.CommunicationComposer = class { const text = frappe.utils.html2text(html); return text.replace(/\n{3,}/g, "\n\n"); } - - sanitize_emails(control) { - let emails = control.get_value(); - if (!emails) return; - let sanitized = emails - .split(",") - .map((email) => frappe.utils.xss_sanitise(email.trim())) - .join(","); - if (sanitized != emails) { - control.set_value(sanitized); - } - } };