mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	Avoid double-unescaping of form value (#26853)
1. The old `prepareQueryArg` did double-unescaping of form value. 2. By the way, remove the unnecessary `ctx.Flash = ...` in `MockContext`. Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
		@@ -50,7 +50,6 @@ func MockContext(t *testing.T, reqPath string) (*context.Context, *httptest.Resp
 | 
			
		||||
	base.Locale = &translation.MockLocale{}
 | 
			
		||||
 | 
			
		||||
	ctx := context.NewWebContext(base, &MockRender{}, nil)
 | 
			
		||||
	ctx.Flash = &middleware.Flash{Values: url.Values{}}
 | 
			
		||||
 | 
			
		||||
	chiCtx := chi.NewRouteContext()
 | 
			
		||||
	ctx.Base.AppendContextValue(chi.RouteCtxKey, chiCtx)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user