diff --git a/dev/Common/UtilsUser.js b/dev/Common/UtilsUser.js index 6f5176d97..1621f1b8b 100644 --- a/dev/Common/UtilsUser.js +++ b/dev/Common/UtilsUser.js @@ -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; diff --git a/dev/Model/Message.js b/dev/Model/Message.js index e19415c04..b45a66fde 100644 --- a/dev/Model/Message.js +++ b/dev/Model/Message.js @@ -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()); }