mirror of
https://github.com/go-gitea/gitea
synced 2024-12-22 08:34:26 +00:00
Fix mail template error (#29410)
This commit is contained in:
parent
4f70ebb684
commit
eb2fc1818b
@ -44,11 +44,17 @@ func buildSubjectBodyTemplate(stpl *texttmpl.Template, btpl *template.Template,
|
||||
}
|
||||
if _, err := stpl.New(name).
|
||||
Parse(string(subjectContent)); err != nil {
|
||||
log.Warn("Failed to parse template [%s/subject]: %v", name, err)
|
||||
log.Error("Failed to parse template [%s/subject]: %v", name, err)
|
||||
if !setting.IsProd {
|
||||
log.Fatal("Please fix the mail template error")
|
||||
}
|
||||
}
|
||||
if _, err := btpl.New(name).
|
||||
Parse(string(bodyContent)); err != nil {
|
||||
log.Warn("Failed to parse template [%s/body]: %v", name, err)
|
||||
log.Error("Failed to parse template [%s/body]: %v", name, err)
|
||||
if !setting.IsProd {
|
||||
log.Fatal("Please fix the mail template error")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<title>{{.Subject}}</title>
|
||||
</head>
|
||||
|
||||
{{$url := HTMLFormat "<a href='%[1]s'>%[2]s</a>" .Link .Repo)}}
|
||||
{{$url := HTMLFormat "<a href='%[1]s'>%[2]s</a>" .Link .Repo}}
|
||||
<body>
|
||||
<p>{{.Subject}}.
|
||||
{{.locale.Tr "mail.repo.transfer.body" $url}}
|
||||
|
Loading…
Reference in New Issue
Block a user