Bugfix the new msgId handling due to Squire sanitizeToDOMFragment using cleanHTML

This commit is contained in:
the-djmaze 2024-10-01 18:05:26 +02:00
parent 584728bc89
commit f7f8d2d542

View file

@ -239,6 +239,8 @@ export const
linkedData: [] linkedData: []
}, },
isMsg = !!msgId,
findAttachmentByCid = cId => oAttachments.findByCid(cId), findAttachmentByCid = cId => oAttachments.findByCid(cId),
findLocationByCid = cId => { findLocationByCid = cId => {
const attachment = findAttachmentByCid(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, const name = oElement.tagName,
oStyle = oElement.style; oStyle = oElement.style;
@ -633,7 +635,7 @@ export const
} }
}); });
msgId && blockquoteSwitcher(); isMsg && blockquoteSwitcher();
// return tmpl.content.firstChild; // return tmpl.content.firstChild;
result.html = tmpl.innerHTML.trim(); result.html = tmpl.innerHTML.trim();