fix(mail(js)): improve quoted message when replying

Fixes #5223
pull/296/head
Francis Lachapelle 2021-03-02 17:16:06 -05:00
parent 6f90977196
commit fa3e5e0b75
1 changed files with 9 additions and 0 deletions

View File

@ -728,6 +728,15 @@
if (accountDefaults.security.alwaysEncrypt)
data.encrypt = true;
}
if (data.isHTML) {
// Sanitize HTML replies to properly display quoted content in CKEditor
var html = angular.element('<div>' + data.text + '</div>');
html.find('meta').remove();
html.find('link').remove();
html.find('base').remove();
html.find('title').remove();
data.text = html.html();
}
angular.extend(message.editable, data);
// We keep a reference to our original message in order to update the flags