diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-02-25 18:45:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-25 10:45:56 +0000 |
commit | f9207b09479df964872d68842469991042b5497f (patch) | |
tree | 78db3a0b9146be056a518bcd012b106f77095ecc /templates/repo/editor | |
parent | 2e33671f2c1e98759e4fd2a90944c534cfdf5776 (diff) | |
download | gitea-f9207b09479df964872d68842469991042b5497f.tar.gz gitea-f9207b09479df964872d68842469991042b5497f.zip |
Refactor Safe modifier (#29392)
After this PR: no need to play with the Safe/Escape tricks anymore. See
the changes for more details.
Diffstat (limited to 'templates/repo/editor')
-rw-r--r-- | templates/repo/editor/cherry_pick.tmpl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/templates/repo/editor/cherry_pick.tmpl b/templates/repo/editor/cherry_pick.tmpl index b65c3a3033..f9c9eef5aa 100644 --- a/templates/repo/editor/cherry_pick.tmpl +++ b/templates/repo/editor/cherry_pick.tmpl @@ -11,11 +11,11 @@ <div class="repo-editor-header"> <div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}"> {{$shaurl := printf "%s/commit/%s" $.RepoLink (PathEscape .SHA)}} - {{$shalink := printf `<a class="ui primary sha label" href="%s">%s</a>` (Escape $shaurl) (ShortSha .SHA)}} + {{$shalink := HTMLFormat `<a class="ui primary sha label" href="%s">%s</a>` $shaurl (ShortSha .SHA)}} {{if eq .CherryPickType "revert"}} - {{ctx.Locale.Tr "repo.editor.revert" ($shalink|Safe)}} + {{ctx.Locale.Tr "repo.editor.revert" $shalink}} {{else}} - {{ctx.Locale.Tr "repo.editor.cherry_pick" ($shalink|Safe)}} + {{ctx.Locale.Tr "repo.editor.cherry_pick" $shalink}} {{end}} <a class="section" href="{{$.RepoLink}}">{{.Repository.FullName}}</a> <div class="breadcrumb-divider">:</div> |