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
This commit is contained in:
parent
4fdb09de58
commit
5914a2f8c0
1 changed files with 2 additions and 2 deletions
|
@ -2,9 +2,9 @@
|
||||||
<div class="ui positive message gt-df gt-ac">
|
<div class="ui positive message gt-df gt-ac">
|
||||||
<div class="gt-f1">
|
<div class="gt-f1">
|
||||||
{{$timeSince := TimeSince .CommitTime.AsTime $.locale}}
|
{{$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>
|
</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"}}
|
{{$.locale.Tr "repo.pulls.compare_changes"}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue