mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-02 21:12:02 +08:00
Prepare cleanHtml() for new feature
This commit is contained in:
parent
4d2cd82d95
commit
aae3072209
2 changed files with 5 additions and 3 deletions
|
@ -276,7 +276,7 @@ populateMessageBody = (oMessage, popup) => {
|
|||
MessageUserStore.error('');
|
||||
const messagesDom = MessageUserStore.bodiesDom();
|
||||
if (messagesDom) {
|
||||
let id = 'rl-msg-' + oMessage.hash.replace(/[^a-zA-Z0-9]/g, ''),
|
||||
let id = 'rl-msg-' + oMessage.hash,
|
||||
body = elementById(id);
|
||||
if (body) {
|
||||
oMessage.body = body;
|
||||
|
|
|
@ -25,6 +25,8 @@ import { LanguageStore } from 'Stores/Language';
|
|||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
const
|
||||
msgHtml = msg => cleanHtml(msg.html(), msg.attachments()),
|
||||
|
||||
toggleTag = (message, keyword) => {
|
||||
const lower = keyword.toLowerCase(),
|
||||
flags = message.flags,
|
||||
|
@ -291,7 +293,7 @@ export class MessageModel extends AbstractModel {
|
|||
viewHtml() {
|
||||
const body = this.body;
|
||||
if (body && this.html()) {
|
||||
let result = cleanHtml(this.html(), this.attachments());
|
||||
let result = msgHtml(this);
|
||||
this.hasExternals(result.hasExternals);
|
||||
this.hasImages(body.rlHasImages = !!result.hasExternals);
|
||||
|
||||
|
@ -460,7 +462,7 @@ export class MessageModel extends AbstractModel {
|
|||
);
|
||||
return clone.innerHTML;
|
||||
}
|
||||
let result = cleanHtml(this.html(), this.attachments())
|
||||
let result = msgHtml(this);
|
||||
return result.html || plainToHtml(this.plain());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue