diff options
author | Ethan Koenig <ethantkoenig@gmail.com> | 2017-11-28 01:43:51 -0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-11-28 17:43:51 +0800 |
commit | b7ebaf6d2078cbf4de00d0782be8bc1b1de644bb (patch) | |
tree | 5ad8ef6f9738883e89559112e965b9a0bf303476 /modules/context/context.go | |
parent | 6a58e3f9fcb8b9f30345e2f8a5812bda72c6baf5 (diff) | |
download | gitea-b7ebaf6d2078cbf4de00d0782be8bc1b1de644bb.tar.gz gitea-b7ebaf6d2078cbf4de00d0782be8bc1b1de644bb.zip |
Various wiki bug fixes (#2996)
* Update macaron
* Various wiki bug fixes
Diffstat (limited to 'modules/context/context.go')
-rw-r--r-- | modules/context/context.go | 3 |
1 files changed, 2 insertions, 1 deletions
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{}, }, |