Revert "Merge pull request #28914 from samkit5495/patch-1"

This reverts commit 22560c36f6, reversing
changes made to 7a7b318662.
This commit is contained in:
Akhil Narang 2025-10-31 13:18:05 +05:30
parent bf58e7be1f
commit 1068b3cb96
No known key found for this signature in database
GPG key ID: 9DCC61E211BF645F

View file

@ -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);
}
}
};