Skip to content

Commit 5914a2f

Browse files
authored
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
1 parent 4fdb09d commit 5914a2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templates/repo/code/recently_pushed_new_branches.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<div class="ui positive message gt-df gt-ac">
33
<div class="gt-f1">
44
{{$timeSince := TimeSince .CommitTime.AsTime $.locale}}
5-
{{$.locale.Tr "repo.pulls.recently_pushed_new_branches" (PathEscapeSegments .Name) $timeSince | Safe}}
5+
{{$.locale.Tr "repo.pulls.recently_pushed_new_branches" (Escape .Name) $timeSince | Safe}}
66
</div>
7-
<a aria-role="button" class="ui compact positive button gt-m-0" href="{{$.Repository.ComposeBranchCompareURL $.Repository.BaseRepo (PathEscapeSegments .Name)}}">
7+
<a role="button" class="ui compact positive button gt-m-0" href="{{$.Repository.ComposeBranchCompareURL $.Repository.BaseRepo .Name}}">
88
{{$.locale.Tr "repo.pulls.compare_changes"}}
99
</a>
1010
</div>

0 commit comments

Comments
 (0)