From a221b2807f0eb46e7ff4fe323af10e9e8c6c18a7 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sun, 30 Sep 2018 13:55:40 -0400 Subject: routes/repo/issue: fix redirect with unexpected escape (#5443) --- pkg/context/context.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pkg/context/context.go') diff --git a/pkg/context/context.go b/pkg/context/context.go index 17a5ec96..f106cd40 100644 --- a/pkg/context/context.go +++ b/pkg/context/context.go @@ -138,6 +138,11 @@ func (c *Context) JSONSuccess(data interface{}) { c.JSON(http.StatusOK, data) } +// RawRedirect simply calls underlying Redirect method with no escape. +func (c *Context) RawRedirect(location string, status ...int) { + c.Context.Redirect(location, status...) +} + // Redirect responses redirection wtih given location and status. // It escapes special characters in the location string. func (c *Context) Redirect(location string, status ...int) { -- cgit v1.2.3