diff options
author | zeripath <art27@cantab.net> | 2022-02-11 05:02:04 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-11 13:02:04 +0800 |
commit | b2b3225bd1f6d6ff519d7a464c7fcf7ff0c6bdcc (patch) | |
tree | 583e0d2e0b832cc6f7dea280b653fb8de1ab5b72 /templates/repo/branch | |
parent | f9e7edc5d9708206def69ecdfb65d186a69cab67 (diff) | |
download | gitea-b2b3225bd1f6d6ff519d7a464c7fcf7ff0c6bdcc.tar.gz gitea-b2b3225bd1f6d6ff519d7a464c7fcf7ff0c6bdcc.zip |
Prevent double encoding of branch names in delete branch (#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 <art27@cantab.net>
* and tag name
Signed-off-by: Andrew Thornton <art27@cantab.net>
* And fix #18704
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'templates/repo/branch')
-rw-r--r-- | templates/repo/branch/list.tmpl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl index ea259949b4..6c34ba4c19 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}} - <a class="ui basic jump button icon tooltip undo-button" href data-url="{{$.Link}}/restore?branch_id={{.DeletedBranch.ID}}&name={{PathEscapeSegments .DeletedBranch.Name}}" data-content="{{$.i18n.Tr "repo.branch.restore" (.Name)}}" data-position="top right"><span class="text blue">{{svg "octicon-reply"}}</span></a> + <a class="ui basic jump button icon tooltip undo-button" href data-url="{{$.Link}}/restore?branch_id={{.DeletedBranch.ID}}&name={{.DeletedBranch.Name}}" data-content="{{$.i18n.Tr "repo.branch.restore" (.Name)}}" data-position="top right"><span class="text blue">{{svg "octicon-reply"}}</span></a> {{else}} - <a class="ui basic jump button icon tooltip delete-button delete-branch-button" href data-url="{{$.Link}}/delete?name={{PathEscapeSegments .Name}}" data-content="{{$.i18n.Tr "repo.branch.delete" (.Name)}}" data-position="top right" data-name="{{.Name}}"> + <a class="ui basic jump button icon tooltip delete-button delete-branch-button" href data-url="{{$.Link}}/delete?name={{.Name}}" data-content="{{$.i18n.Tr "repo.branch.delete" (.Name)}}" data-position="top right" data-name="{{.Name}}"> {{svg "octicon-trash"}} </a> {{end}} |