mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Properly escape release attachment URL (#6512)
Make sure file attachments on a release get a properly escaped URL when linking. Fixes #6506
This commit is contained in:
		
				
					committed by
					
						
						techknowlogick
					
				
			
			
				
	
			
			
			
						parent
						
							9bf20f47c4
						
					
				
				
					commit
					0bdd81df9d
				
			@@ -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>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user