Merge pull request #1861 from hungyao/patch-1

Update Html.js to remove x-html tags before rendering
This commit is contained in:
Maarten 2024-12-10 14:13:27 +01:00 committed by GitHub
commit 149cf5a120
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -308,6 +308,8 @@ export const
// Not supported by <template> element
// .replace(/<!doctype[^>]*>/gi, '')
// .replace(/<\?xml[^>]*\?>/gi, '')
// https://github.com/the-djmaze/snappymail/issues/1860
.replace(/<(\/?)x-html(\s[^>]*)?>/gi, '')
.replace(/<(\/?)head(\s[^>]*)?>/gi, '')
.replace(/<(\/?)body(\s[^>]*)?>/gi, '<$1div class="mail-body"$2>')
// .replace(/<\/?(html|head)[^>]*>/gi, '')