mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03: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;
|
let i = oElement.attributes.length;
|
||||||
while (i--) {
|
while (i--) {
|
||||||
let sAttrName = oElement.attributes[i].name.toLowerCase();
|
let sAttrName = oElement.attributes[i].name.toLowerCase();
|
||||||
if (!allowedAttributes.includes(sAttrName)) {
|
if (!allowedAttributes.includes(sAttrName) && ('class' !== sAttrName || 'mail-body' !== className)) {
|
||||||
delAttribute(sAttrName);
|
delAttribute(sAttrName);
|
||||||
aAttrsForRemove.push(sAttrName);
|
aAttrsForRemove.push(sAttrName);
|
||||||
}
|
}
|
||||||
|
|
@ -542,7 +542,7 @@ export const
|
||||||
oStyle.removeProperty('color');
|
oStyle.removeProperty('color');
|
||||||
}
|
}
|
||||||
|
|
||||||
oStyle.cssText = cleanCSS(oStyle.cssText);
|
oStyle.cssText && (oStyle.cssText = cleanCSS(oStyle.cssText));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug && aAttrsForRemove.length) {
|
if (debug && aAttrsForRemove.length) {
|
||||||
|
|
|
||||||
|
|
@ -464,7 +464,7 @@ export class MessageModel extends AbstractModel {
|
||||||
clone.querySelectorAll('.sm-bq-switcher').forEach(
|
clone.querySelectorAll('.sm-bq-switcher').forEach(
|
||||||
node => node.replaceWith(node.lastElementChild)
|
node => node.replaceWith(node.lastElementChild)
|
||||||
);
|
);
|
||||||
return clone.innerHTML;
|
return (clone.querySelector('.mail-body') || clone).innerHTML;
|
||||||
}
|
}
|
||||||
let result = msgHtml(this);
|
let result = msgHtml(this);
|
||||||
return result.html || plainToHtml(this.plain());
|
return result.html || plainToHtml(this.plain());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue