Use Escape

This commit is contained in:
Lunny Xiao 2024-02-25 13:24:43 +08:00
parent 09be5ac173
commit 41df70ddba
1 changed files with 1 additions and 1 deletions

View File

@ -619,7 +619,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$newProjectDisplayHtml := .CommentMetaData.ProjectTitle}}
{{$newProjectDisplayHtml := .CommentMetaData.ProjectTitle | Escape}}
{{if .Project}}
{{$trKey := printf "projects.type-%d.display_name" .Project.Type}}
{{$newProjectDisplayHtml = printf `%s <a href="%s"><span data-tooltip-content="%s">%s</span></a>` (svg .Project.IconName) (.Project.Link ctx) (ctx.Locale.Tr $trKey | Escape) (.Project.Title | Escape)}}