mirror of
https://github.com/knadh/listmonk.git
synced 2024-11-10 17:13:04 +08:00
Improve HTML check in notif template loading. Closes #903.
This commit is contained in:
parent
f266f93cc8
commit
edb4c9168d
1 changed files with 1 additions and 1 deletions
|
@ -615,7 +615,7 @@ func initNotifTemplates(path string, fs stuffbin.FileSystem, i *i18n.I18n, cs *c
|
||||||
h := make([]byte, ln)
|
h := make([]byte, ln)
|
||||||
copy(h, html[0:ln])
|
copy(h, html[0:ln])
|
||||||
|
|
||||||
if !bytes.Contains(bytes.ToLower(h), []byte("<!doctype html>")) {
|
if !bytes.Contains(bytes.ToLower(h), []byte("<!doctype html")) {
|
||||||
out.contentType = models.CampaignContentTypePlain
|
out.contentType = models.CampaignContentTypePlain
|
||||||
lo.Println("system e-mail templates are plaintext")
|
lo.Println("system e-mail templates are plaintext")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue