From d42cecb4df52af4f0134e8984f59670c0cd14907 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Thu, 21 Jul 2022 10:13:24 +0200 Subject: [PATCH] Resolve #462 --- dev/Common/Html.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dev/Common/Html.js b/dev/Common/Html.js index dbd8ae2f9..dafb0991a 100644 --- a/dev/Common/Html.js +++ b/dev/Common/Html.js @@ -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; }