mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-10-31 14:31:02 +00:00 
			
		
		
		
	Backport #26392 by @wxiaoguang Fix #26389 And complete an old TODO: `ctx.Params does un-escaping,..., which is incorrect.` Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
		
					parent
					
						
							
								df5558135b
							
						
					
				
			
			
				commit
				
					
						2d1a7e1cd4
					
				
			
		
					 5 changed files with 27 additions and 17 deletions
				
			
		|  | @ -59,6 +59,7 @@ func TestWebPathToDisplayName(t *testing.T) { | |||
| 		{"name with / slash", "name-with %2F slash"}, | ||||
| 		{"name with % percent", "name-with %25 percent"}, | ||||
| 		{"2000-01-02 meeting", "2000-01-02+meeting.-.md"}, | ||||
| 		{"a b", "a%20b.md"}, | ||||
| 	} { | ||||
| 		_, displayName := WebPathToUserTitle(test.WebPath) | ||||
| 		assert.EqualValues(t, test.Expected, displayName) | ||||
|  | @ -73,7 +74,8 @@ func TestWebPathToGitPath(t *testing.T) { | |||
| 	for _, test := range []test{ | ||||
| 		{"wiki-name.md", "wiki%20name"}, | ||||
| 		{"wiki-name.md", "wiki+name"}, | ||||
| 		{"wiki%20name.md", "wiki%20name.md"}, | ||||
| 		{"wiki name.md", "wiki%20name.md"}, | ||||
| 		{"wiki%20name.md", "wiki%2520name.md"}, | ||||
| 		{"2000-01-02-meeting.md", "2000-01-02+meeting"}, | ||||
| 		{"2000-01-02 meeting.-.md", "2000-01-02%20meeting.-"}, | ||||
| 	} { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue