This commit is contained in:
the-djmaze 2023-08-29 16:08:24 +02:00
parent 4f3265f8b6
commit c60f8776f4
2 changed files with 3 additions and 3 deletions

View file

@ -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) {

View file

@ -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());