From 2d0db240833b2763406c8bbb6955b9e47b585edb Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Mon, 28 May 2018 17:13:53 +0200 Subject: [PATCH] Fix wiki redirects (#3919) (#4065) When creating or editing a wiki page, the redirect to the wiki page does not work because the file name is used instead of the page name. --- routers/repo/wiki.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routers/repo/wiki.go b/routers/repo/wiki.go index 87cb9f303..3220ab134 100644 --- a/routers/repo/wiki.go +++ b/routers/repo/wiki.go @@ -350,7 +350,7 @@ func NewWikiPost(ctx *context.Context, form auth.NewWikiForm) { return } - ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.WikiNameToFilename(wikiName)) + ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.WikiNameToSubURL(wikiName)) } // EditWiki render wiki modify page @@ -391,7 +391,7 @@ func EditWikiPost(ctx *context.Context, form auth.NewWikiForm) { return } - ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.WikiNameToFilename(newWikiName)) + ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.WikiNameToSubURL(newWikiName)) } // DeleteWikiPagePost delete wiki page