summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2018-02-05 16:56:30 +0200
committerGitHub <noreply@github.com>2018-02-05 16:56:30 +0200
commit283e87d8145ac5dd61f86f61e347ffa684ac5684 (patch)
tree258a5d90d5e8117a9ffe412505a82212c4a38eb1 /routers
parentb16c84de7b402c03ffda2dc9dd1ebc4f89928d0f (diff)
downloadgitea-283e87d8145ac5dd61f86f61e347ffa684ac5684.tar.gz
gitea-283e87d8145ac5dd61f86f61e347ffa684ac5684.zip
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
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/wiki.go6
1 files changed, 6 insertions, 0 deletions
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
}