Various wiki bug fixes (#2996)

* Update macaron

* Various wiki bug fixes
This commit is contained in:
Ethan Koenig 2017-11-28 01:43:51 -08:00 committed by Lunny Xiao
parent 6a58e3f9fc
commit b7ebaf6d20
40 changed files with 1087 additions and 381 deletions

View file

@ -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{},
},