From f3eb835886031df7a562abc123c3f6011c81eca8 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Thu, 15 Feb 2024 05:48:45 +0800 Subject: Refactor locale&string&template related code (#29165) Clarify when "string" should be used (and be escaped), and when "template.HTML" should be used (no need to escape) And help PRs like #29059 , to render the error messages correctly. --- templates/mail/issue/assigned.tmpl | 4 ++-- templates/mail/issue/default.tmpl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'templates/mail/issue') diff --git a/templates/mail/issue/assigned.tmpl b/templates/mail/issue/assigned.tmpl index d02ea39918..e80bd2fc31 100644 --- a/templates/mail/issue/assigned.tmpl +++ b/templates/mail/issue/assigned.tmpl @@ -13,9 +13,9 @@

{{if .IsPull}} - {{.locale.Tr "mail.issue_assigned.pull" .Doer.Name $link $repo_url | Str2html}} + {{.locale.Tr "mail.issue_assigned.pull" .Doer.Name ($link|Safe) ($repo_url|Safe)}} {{else}} - {{.locale.Tr "mail.issue_assigned.issue" .Doer.Name $link $repo_url | Str2html}} + {{.locale.Tr "mail.issue_assigned.issue" .Doer.Name ($link|Safe) ($repo_url|Safe)}} {{end}}