From 59aa1cac359347724b6b277f1ac9306ede1372eb Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Fri, 12 May 2023 23:43:13 +0200 Subject: [PATCH] Resolve #1125 --- dev/Common/Html.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dev/Common/Html.js b/dev/Common/Html.js index ae68956ba..d27de8d50 100644 --- a/dev/Common/Html.js +++ b/dev/Common/Html.js @@ -289,6 +289,9 @@ export const + (0 < bqLevel ? ',' + (new Array(1 + bqLevel).fill('blockquote').join(' ')) : '') ).forEach(oElement => oElement.remove()); + // https://github.com/the-djmaze/snappymail/issues/1125 + tmpl.content.querySelectorAll('form,button').forEach(oElement => replaceWithChildren(oElement)); + [...tmpl.content.querySelectorAll('*')].forEach(oElement => { const name = oElement.tagName, oStyle = oElement.style; @@ -394,7 +397,7 @@ export const } // if (['CENTER','FORM'].includes(name)) { - if ('FORM' === name || 'O:P' === name || (nonEmptyTags.includes(name) && ('' == oElement.textContent.trim()))) { + if ('O:P' === name || (nonEmptyTags.includes(name) && ('' == oElement.textContent.trim()))) { ('A' !== name || !oElement.querySelector('IMG')) && replaceWithChildren(oElement); return; }