diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-08-27 08:16:02 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-27 08:16:02 +0800 |
commit | 5914a2f8c04420bf47bd3a9f923e70b67a1f4b99 (patch) | |
tree | 9099736398b8a77ed7a6e7696b2387fbe8e42964 /templates | |
parent | 4fdb09de588fb1ff32184411df80d5d59333b94c (diff) | |
download | gitea-5914a2f8c04420bf47bd3a9f923e70b67a1f4b99.tar.gz gitea-5914a2f8c04420bf47bd3a9f923e70b67a1f4b99.zip |
Fix template bugs in recently_pushed_new_branches.tmpl (#26744)
Fix some bugs from #25715, fix #25830
1. `$.locale.Tr ... Safe` needs `Escape`, but not `PathEscapeSegments`
2. The attribute should be `role`
3. The `ComposeBranchCompareURL` already does escaping correctly
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/code/recently_pushed_new_branches.tmpl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/code/recently_pushed_new_branches.tmpl b/templates/repo/code/recently_pushed_new_branches.tmpl index ad68b15831..d460fd6852 100644 --- a/templates/repo/code/recently_pushed_new_branches.tmpl +++ b/templates/repo/code/recently_pushed_new_branches.tmpl @@ -2,9 +2,9 @@ <div class="ui positive message gt-df gt-ac"> <div class="gt-f1"> {{$timeSince := TimeSince .CommitTime.AsTime $.locale}} - {{$.locale.Tr "repo.pulls.recently_pushed_new_branches" (PathEscapeSegments .Name) $timeSince | Safe}} + {{$.locale.Tr "repo.pulls.recently_pushed_new_branches" (Escape .Name) $timeSince | Safe}} </div> - <a aria-role="button" class="ui compact positive button gt-m-0" href="{{$.Repository.ComposeBranchCompareURL $.Repository.BaseRepo (PathEscapeSegments .Name)}}"> + <a role="button" class="ui compact positive button gt-m-0" href="{{$.Repository.ComposeBranchCompareURL $.Repository.BaseRepo .Name}}"> {{$.locale.Tr "repo.pulls.compare_changes"}} </a> </div> |