1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00

Use Escape

This commit is contained in:
Lunny Xiao 2024-02-25 13:24:43 +08:00
parent 8bd1218e8b
commit d7f48be02f

View File

@ -607,7 +607,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)}}