From b7ebaf6d2078cbf4de00d0782be8bc1b1de644bb Mon Sep 17 00:00:00 2001 From: Ethan Koenig Date: Tue, 28 Nov 2017 01:43:51 -0800 Subject: Various wiki bug fixes (#2996) * Update macaron * Various wiki bug fixes --- modules/context/context.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/context') diff --git a/modules/context/context.go b/modules/context/context.go index 2c9afb36e7..6fb0a2cde3 100644 --- a/modules/context/context.go +++ b/modules/context/context.go @@ -36,6 +36,7 @@ type Context struct { Session session.Store Link string // current request URL + EscapedLink string User *models.User IsSigned bool IsBasicAuth bool @@ -157,7 +158,7 @@ func Contexter() macaron.Handler { csrf: x, Flash: f, Session: sess, - Link: setting.AppSubURL + strings.TrimSuffix(c.Req.URL.Path, "/"), + Link: setting.AppSubURL + strings.TrimSuffix(c.Req.URL.EscapedPath(), "/"), Repo: &Repository{ PullRequest: &PullRequest{}, }, -- cgit v1.2.3