From f7f8d2d5429e248c8a2ceb012a420816d9871e1e Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Tue, 1 Oct 2024 18:05:26 +0200 Subject: [PATCH] Bugfix the new msgId handling due to Squire sanitizeToDOMFragment using cleanHTML --- dev/Common/Html.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dev/Common/Html.js b/dev/Common/Html.js index 3f86fe58c..0e8029fbd 100644 --- a/dev/Common/Html.js +++ b/dev/Common/Html.js @@ -239,6 +239,8 @@ export const linkedData: [] }, + isMsg = !!msgId, + findAttachmentByCid = cId => oAttachments.findByCid(cId), findLocationByCid = cId => { const attachment = findAttachmentByCid(cId); @@ -358,7 +360,7 @@ export const }); */ - msgId && [...tmpl.content.querySelectorAll('*')].forEach(oElement => { + isMsg && [...tmpl.content.querySelectorAll('*')].forEach(oElement => { const name = oElement.tagName, oStyle = oElement.style; @@ -633,7 +635,7 @@ export const } }); - msgId && blockquoteSwitcher(); + isMsg && blockquoteSwitcher(); // return tmpl.content.firstChild; result.html = tmpl.innerHTML.trim();