diff options
author | mrsdizzie <info@mrsdizzie.com> | 2019-04-05 13:00:20 -0400 |
---|---|---|
committer | techknowlogick <matti@mdranta.net> | 2019-04-05 13:00:20 -0400 |
commit | 2551660f497e2a3cdb8f67768024ab9278e92261 (patch) | |
tree | 445b99e647b60f467cbacd2d95e56027486b7e49 | |
parent | 3b28de7d8eff9d9500e6db5c8db7c16e5b731c7f (diff) | |
download | gitea-2551660f497e2a3cdb8f67768024ab9278e92261.tar.gz gitea-2551660f497e2a3cdb8f67768024ab9278e92261.zip |
Properly escape release attachment URL (#6512) (#6523)
Make sure file attachments on a release get a properly escaped URL when
linking.
Fixes #6506
-rw-r--r-- | templates/repo/release/list.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl index 9df2f6cb81..c57a180873 100644 --- a/templates/repo/release/list.tmpl +++ b/templates/repo/release/list.tmpl @@ -77,7 +77,7 @@ {{if .Attachments}} {{range $attachment := .Attachments}} <li> - <a target="_blank" rel="noopener noreferrer" href="{{$.RepoLink}}/releases/download/{{$release.TagName}}/{{$attachment.Name}}"> + <a target="_blank" rel="noopener noreferrer" href="{{$.RepoLink}}/releases/download/{{$release.TagName | PathEscape}}/{{$attachment.Name | PathEscape}}"> <strong><span class="ui image octicon octicon-package" title='{{$attachment.Name}}'></span> {{$attachment.Name}}</strong> <span class="ui text grey right">{{$attachment.Size | FileSize}}</span> </a> |