From 044cb09ae80f459d4ddc4b5dc1619de02175cde3 Mon Sep 17 00:00:00 2001 From: zeripath Date: Sat, 12 Feb 2022 15:17:45 +0000 Subject: [PATCH] Prevent double encoding of branch names in delete branch (#18714) (#18738) Backport #18714 * Prevent double encoding of branch names in delete branch There is a double encoding issue in branch template whereby the branch name ends up double encoded. Fix #18709 Signed-off-by: Andrew Thornton * and tag name Signed-off-by: Andrew Thornton * And fix #18704 Signed-off-by: Andrew Thornton --- templates/mail/issue/assigned.tmpl | 2 +- templates/repo/branch/list.tmpl | 4 ++-- templates/repo/release/list.tmpl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/mail/issue/assigned.tmpl b/templates/mail/issue/assigned.tmpl index e1156c5335..ffb15ef677 100644 --- a/templates/mail/issue/assigned.tmpl +++ b/templates/mail/issue/assigned.tmpl @@ -9,7 +9,7 @@ {{$repo_url := printf "%s" (Escape .Issue.Repo.HTMLURL) (Escape .Issue.Repo.FullName)}} -{{$link := printf "#%d" (Escape .Link) (Escape .Issue.Index)}} +{{$link := printf "#%d" (Escape .Link) .Issue.Index}}

{{if .IsPull}} diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl index fc81901069..d2b54589ce 100644 --- a/templates/repo/branch/list.tmpl +++ b/templates/repo/branch/list.tmpl @@ -121,9 +121,9 @@ {{end}} {{if and $.IsWriter (not $.IsMirror) (not $.Repository.IsArchived) (not .IsProtected)}} {{if .IsDeleted}} - {{svg "octicon-reply"}} + {{svg "octicon-reply"}} {{else}} - + {{svg "octicon-trash"}} {{end}} diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl index 01f01cdeff..d770383bc3 100644 --- a/templates/repo/release/list.tmpl +++ b/templates/repo/release/list.tmpl @@ -40,7 +40,7 @@ {{svg "octicon-file-zip" 16 "mr-2"}}ZIP {{svg "octicon-file-zip" 16 "mr-2"}}TAR.GZ {{if (and $.CanCreateRelease $release.IsTag)}} - {{svg "octicon-tag" 16 "mr-2"}}{{$.i18n.Tr "repo.release.new_release"}} + {{svg "octicon-tag" 16 "mr-2"}}{{$.i18n.Tr "repo.release.new_release"}} {{end}} {{if (and ($.Permission.CanWrite $.UnitTypeCode) $release.IsTag)}}