mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-02-22 22:04:43 +08:00
Resolve #1208
This commit is contained in:
parent
4f3265f8b6
commit
c60f8776f4
2 changed files with 3 additions and 3 deletions
|
@ -346,7 +346,7 @@ export const
|
|||
let i = oElement.attributes.length;
|
||||
while (i--) {
|
||||
let sAttrName = oElement.attributes[i].name.toLowerCase();
|
||||
if (!allowedAttributes.includes(sAttrName)) {
|
||||
if (!allowedAttributes.includes(sAttrName) && ('class' !== sAttrName || 'mail-body' !== className)) {
|
||||
delAttribute(sAttrName);
|
||||
aAttrsForRemove.push(sAttrName);
|
||||
}
|
||||
|
@ -542,7 +542,7 @@ export const
|
|||
oStyle.removeProperty('color');
|
||||
}
|
||||
|
||||
oStyle.cssText = cleanCSS(oStyle.cssText);
|
||||
oStyle.cssText && (oStyle.cssText = cleanCSS(oStyle.cssText));
|
||||
}
|
||||
|
||||
if (debug && aAttrsForRemove.length) {
|
||||
|
|
|
@ -464,7 +464,7 @@ export class MessageModel extends AbstractModel {
|
|||
clone.querySelectorAll('.sm-bq-switcher').forEach(
|
||||
node => node.replaceWith(node.lastElementChild)
|
||||
);
|
||||
return clone.innerHTML;
|
||||
return (clone.querySelector('.mail-body') || clone).innerHTML;
|
||||
}
|
||||
let result = msgHtml(this);
|
||||
return result.html || plainToHtml(this.plain());
|
||||
|
|
Loading…
Reference in a new issue