Skip to content

Commit 2551660

Browse files
mrsdizzietechknowlogick
authored andcommitted
Properly escape release attachment URL (#6512) (#6523)
Make sure file attachments on a release get a properly escaped URL when linking. Fixes #6506
1 parent 3b28de7 commit 2551660

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/repo/release/list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
{{if .Attachments}}
7878
{{range $attachment := .Attachments}}
7979
<li>
80-
<a target="_blank" rel="noopener noreferrer" href="{{$.RepoLink}}/releases/download/{{$release.TagName}}/{{$attachment.Name}}">
80+
<a target="_blank" rel="noopener noreferrer" href="{{$.RepoLink}}/releases/download/{{$release.TagName | PathEscape}}/{{$attachment.Name | PathEscape}}">
8181
<strong><span class="ui image octicon octicon-package" title='{{$attachment.Name}}'></span> {{$attachment.Name}}</strong>
8282
<span class="ui text grey right">{{$attachment.Size | FileSize}}</span>
8383
</a>

0 commit comments

Comments
 (0)