Skip to content

Commit

Permalink
Properly escape release attachment URL (go-gitea#6512)
Browse files Browse the repository at this point in the history
Make sure file attachments on a release get a properly escaped URL when
linking.

Fixes go-gitea#6506
  • Loading branch information
mrsdizzie committed Apr 5, 2019
1 parent 3b28de7 commit 307ff96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/repo/release/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 307ff96

Please sign in to comment.