mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Update Html.js to remove x-html tags before rendering
Fix for https://github.com/the-djmaze/snappymail/issues/1860 to remove <x-html></x-html> tags that might be emitted by certain email clients. Tested by modifying locally using JS debugger and Snappymail JS debug mode.
This commit is contained in:
parent
7eaa065d76
commit
e16d0b52ae
1 changed files with 2 additions and 0 deletions
|
|
@ -308,6 +308,8 @@ export const
|
||||||
// Not supported by <template> element
|
// Not supported by <template> element
|
||||||
// .replace(/<!doctype[^>]*>/gi, '')
|
// .replace(/<!doctype[^>]*>/gi, '')
|
||||||
// .replace(/<\?xml[^>]*\?>/gi, '')
|
// .replace(/<\?xml[^>]*\?>/gi, '')
|
||||||
|
// https://github.com/the-djmaze/snappymail/issues/1860
|
||||||
|
.replace(/<(\/?)x-html(\s[^>]*)?>/gi, '')
|
||||||
.replace(/<(\/?)head(\s[^>]*)?>/gi, '')
|
.replace(/<(\/?)head(\s[^>]*)?>/gi, '')
|
||||||
.replace(/<(\/?)body(\s[^>]*)?>/gi, '<$1div class="mail-body"$2>')
|
.replace(/<(\/?)body(\s[^>]*)?>/gi, '<$1div class="mail-body"$2>')
|
||||||
// .replace(/<\/?(html|head)[^>]*>/gi, '')
|
// .replace(/<\/?(html|head)[^>]*>/gi, '')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue