diff --git a/frappe/public/js/frappe/form/footer/timeline.js b/frappe/public/js/frappe/form/footer/timeline.js index 0782f57b91..44771dd7c5 100644 --- a/frappe/public/js/frappe/form/footer/timeline.js +++ b/frappe/public/js/frappe/form/footer/timeline.js @@ -2,6 +2,7 @@ // MIT License. See license.txt frappe.provide('frappe.timeline'); +frappe.separator_element = '
---
'; frappe.ui.form.Timeline = class Timeline { constructor(opts) { @@ -344,7 +345,7 @@ frappe.ui.form.Timeline = class Timeline { }); } else { if(c.communication_type=="Communication" && c.communication_medium=="Email") { - c.content = c.content.split('')[0]; + c.content = c.content.split(frappe.separator_element)[0]; c.content = frappe.utils.strip_original_content(c.content); c.original_content = c.content; diff --git a/frappe/public/js/frappe/views/communication.js b/frappe/public/js/frappe/views/communication.js index 46f25bc23b..95fef7cf5a 100755 --- a/frappe/public/js/frappe/views/communication.js +++ b/frappe/public/js/frappe/views/communication.js @@ -11,6 +11,7 @@ frappe.views.CommunicationComposer = Class.extend({ }, make: function() { var me = this; + this.dialog = new frappe.ui.Dialog({ title: (this.title || this.subject || __("New Email")), no_submit_on_enter: true, @@ -499,7 +500,7 @@ frappe.views.CommunicationComposer = Class.extend({ if (this.dialog) { try { let message = this.dialog.get_value('content'); - message = message.split('')[0]; + message = message.split(frappe.separator_element)[0]; localStorage.setItem(this.frm.doctype + this.frm.docname, message); } catch (e) { // silently fail @@ -656,9 +657,9 @@ frappe.views.CommunicationComposer = Class.extend({ let last_email_content = last_email.original_comment || last_email.content; - last_email_content = last_email_content - .replace(/<meta[\s\S]*meta>/g, '') // remove tags - .replace(/<style[\s\S]*<\/style>/g, ''); // // remove