From 283e87d8145ac5dd61f86f61e347ffa684ac5684 Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Mon, 5 Feb 2018 16:56:30 +0200 Subject: Fix rendering of wiki page list if wiki repo contains other files (#3454) * Fix rendering of wiki page list if wiki repo contains other files * Improve wiki filename tests --- routers/repo/wiki.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'routers') diff --git a/routers/repo/wiki.go b/routers/repo/wiki.go index 7befe7c687..87cb9f3037 100644 --- a/routers/repo/wiki.go +++ b/routers/repo/wiki.go @@ -128,6 +128,9 @@ func renderWikiPage(ctx *context.Context, isViewPage bool) (*git.Repository, *gi } wikiName, err := models.WikiFilenameToName(entry.Name()) if err != nil { + if models.IsErrWikiInvalidFileName(err) { + continue + } ctx.ServerError("WikiFilenameToName", err) return nil, nil } else if wikiName == "_Sidebar" || wikiName == "_Footer" { @@ -262,6 +265,9 @@ func WikiPages(ctx *context.Context) { } wikiName, err := models.WikiFilenameToName(entry.Name()) if err != nil { + if models.IsErrWikiInvalidFileName(err) { + continue + } ctx.ServerError("WikiFilenameToName", err) return } -- cgit v1.2.3