Skip to content

Commit fd274ff

Browse files
michaelkuhntechknowlogick
authored andcommitted
Fix wiki redirects (#3919)
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.
1 parent 0be2b34 commit fd274ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

routers/repo/wiki.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ func NewWikiPost(ctx *context.Context, form auth.NewWikiForm) {
350350
return
351351
}
352352

353-
ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.WikiNameToFilename(wikiName))
353+
ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.WikiNameToSubURL(wikiName))
354354
}
355355

356356
// EditWiki render wiki modify page
@@ -391,7 +391,7 @@ func EditWikiPost(ctx *context.Context, form auth.NewWikiForm) {
391391
return
392392
}
393393

394-
ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.WikiNameToFilename(newWikiName))
394+
ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.WikiNameToSubURL(newWikiName))
395395
}
396396

397397
// DeleteWikiPagePost delete wiki page

0 commit comments

Comments
 (0)