From 01c5233b53d931996844716dfe80511fd1f9abb5 Mon Sep 17 00:00:00 2001 From: Flare Date: Sun, 18 Sep 2016 23:46:52 +0800 Subject: 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 --- routers/repo/editor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routers') 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) { -- cgit v1.2.3