aboutsummaryrefslogtreecommitdiff
path: root/pkg/context/context.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2018-09-30 13:55:40 -0400
committerUnknwon <u@gogs.io>2018-09-30 13:55:40 -0400
commita221b2807f0eb46e7ff4fe323af10e9e8c6c18a7 (patch)
treefd013e0bd380dfa135bc2e878d9110e9b042d00f /pkg/context/context.go
parent0d66b1cc1c8c44c041f5274f967535d62bd371e1 (diff)
routes/repo/issue: fix redirect with unexpected escape (#5443)
Diffstat (limited to 'pkg/context/context.go')
-rw-r--r--pkg/context/context.go5
1 files changed, 5 insertions, 0 deletions
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) {