mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 22:28:05 +01:00 
			
		
		
		
	Wiki pages containing question marks in their name weren't loading
(untested)
This commit is contained in:
		
							parent
							
								
									c62a6b7a12
								
							
						
					
					
						commit
						0721095944
					
				| @ -13,6 +13,8 @@ import ( | |||||||
| 	"strings" | 	"strings" | ||||||
| 	"sync" | 	"sync" | ||||||
| 
 | 
 | ||||||
|  | 	"net/url" | ||||||
|  | 
 | ||||||
| 	"github.com/Unknwon/com" | 	"github.com/Unknwon/com" | ||||||
| 
 | 
 | ||||||
| 	"github.com/gogits/git-module" | 	"github.com/gogits/git-module" | ||||||
| @ -65,12 +67,12 @@ var wikiWorkingPool = &workingPool{ | |||||||
| 
 | 
 | ||||||
| // ToWikiPageURL formats a string to corresponding wiki URL name. | // ToWikiPageURL formats a string to corresponding wiki URL name. | ||||||
| func ToWikiPageURL(name string) string { | func ToWikiPageURL(name string) string { | ||||||
| 	return strings.Replace(name, " ", "-", -1) | 	return url.QueryEscape(strings.Replace(name, " ", "-", -1)) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // ToWikiPageName formats a URL back to corresponding wiki page name. | // ToWikiPageName formats a URL back to corresponding wiki page name. | ||||||
| func ToWikiPageName(name string) string { | func ToWikiPageName(name string) string { | ||||||
| 	return strings.Replace(name, "-", " ", -1) | 	return url.QueryUnescape(strings.Replace(name, "-", " ", -1)) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // WikiCloneLink returns clone URLs of repository wiki. | // WikiCloneLink returns clone URLs of repository wiki. | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user