From 5914a2f8c04420bf47bd3a9f923e70b67a1f4b99 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sun, 27 Aug 2023 08:16:02 +0800 Subject: [PATCH] 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 --- templates/repo/code/recently_pushed_new_branches.tmpl | 4 ++-- 1 file 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 @@
{{$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}}
- + {{$.locale.Tr "repo.pulls.compare_changes"}}