mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Resolve #1086
This commit is contained in:
parent
8630b418d1
commit
c7cc250b1e
1 changed files with 1 additions and 4 deletions
|
|
@ -265,8 +265,6 @@ export const
|
|||
}
|
||||
|
||||
tmpl.innerHTML = html
|
||||
// Strip Microsoft comments
|
||||
.replace(/<!--\[if[\s\S]*?-->/gi, '')
|
||||
// .replace(/<pre[^>]*>[\s\S]*?<\/pre>/gi, pre => pre.replace(/\n/g, '\n<br>'))
|
||||
// Not supported by <template> element
|
||||
// .replace(/<!doctype[^>]*>/gi, '')
|
||||
|
|
@ -280,8 +278,7 @@ export const
|
|||
.trim();
|
||||
html = '';
|
||||
|
||||
// \MailSo\Base\HtmlUtils::ClearComments()
|
||||
// https://github.com/the-djmaze/snappymail/issues/187
|
||||
// Strip all comments
|
||||
const nodeIterator = document.createNodeIterator(tmpl.content, NodeFilter.SHOW_COMMENT);
|
||||
while (nodeIterator.nextNode()) {
|
||||
nodeIterator.referenceNode.remove();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue