mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-01 20:42:19 +08:00
Resolve #462
This commit is contained in:
parent
4238834cb5
commit
d42cecb4df
1 changed files with 2 additions and 3 deletions
|
@ -100,7 +100,7 @@ export const
|
|||
'BGSOUND','KEYGEN','SOURCE','OBJECT','EMBED','APPLET','IFRAME','FRAME','FRAMESET','VIDEO','AUDIO','AREA','MAP'
|
||||
],
|
||||
nonEmptyTags = [
|
||||
'A','B','EM','I','SPAN','STRONG','O:P','TABLE'
|
||||
'A','B','EM','I','SPAN','STRONG','TABLE'
|
||||
];
|
||||
|
||||
tpl.innerHTML = html
|
||||
|
@ -132,13 +132,12 @@ export const
|
|||
// || (oStyle.maxHeight && 1 > parseFloat(oStyle.maxHeight)
|
||||
// || (oStyle.maxWidth && 1 > parseFloat(oStyle.maxWidth)
|
||||
// || ('0' === oStyle.opacity
|
||||
|| (nonEmptyTags.includes(name) && ('' == oElement.textContent.trim() && !oElement.querySelector('img')))
|
||||
) {
|
||||
oElement.remove();
|
||||
return;
|
||||
}
|
||||
// if (['CENTER','FORM'].includes(name)) {
|
||||
if ('FORM' === name || 'O:P' === name) {
|
||||
if ('FORM' === name || 'O:P' === name || (nonEmptyTags.includes(name) && ('' == oElement.textContent.trim()))) {
|
||||
replaceWithChildren(oElement);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue