summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorFlare <flare@lefs.me>2016-09-18 23:46:52 +0800
committerFlare <flare@lefs.me>2016-11-08 22:09:48 +0800
commit01c5233b53d931996844716dfe80511fd1f9abb5 (patch)
treee097e6d6957ec741da3654db8e6f261f26c1378a /routers
parent7e15ff9486cde36b76f3d39b7db23f89278acb7d (diff)
downloadgitea-01c5233b53d931996844716dfe80511fd1f9abb5.tar.gz
gitea-01c5233b53d931996844716dfe80511fd1f9abb5.zip
Fixed 404 caused by unexpected question mark
This fixes 404 caused when creating new files or wiki pages with question marks. Amended to force CI rebuild
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/editor.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/repo/editor.go b/routers/repo/editor.go
index 428a25d568..f572615e78 100644
--- a/routers/repo/editor.go
+++ b/routers/repo/editor.go
@@ -264,7 +264,7 @@ func editFilePost(ctx *context.Context, form auth.EditRepoFileForm, isNewFile bo
return
}
- ctx.Redirect(ctx.Repo.RepoLink + "/src/" + branchName + "/" + form.TreePath)
+ ctx.Redirect(ctx.Repo.RepoLink + "/src/" + branchName + "/" + strings.NewReplacer("%", "%25", "#", "%23", " ", "%20", "?", "%3F").Replace(form.TreePath))
}
func EditFilePost(ctx *context.Context, form auth.EditRepoFileForm) {