summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2017-03-08 08:34:22 +0800
committerGitHub <noreply@github.com>2017-03-08 08:34:22 +0800
commitaf9998b8a7b1db3d41783a115a2d0506bcba09d3 (patch)
tree4469e1ff6e5ca5db20353264dbbdfba3a81d1a91
parent7ed00b6e8d571ab8efc99aa69d545cce609dd900 (diff)
downloadgitea-af9998b8a7b1db3d41783a115a2d0506bcba09d3.tar.gz
gitea-af9998b8a7b1db3d41783a115a2d0506bcba09d3.zip
fix UI display problem when wiki name is non-ascii charset (#1142)
-rw-r--r--routers/repo/wiki.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/wiki.go b/routers/repo/wiki.go
index 7da49f61a6..2633ae9cea 100644
--- a/routers/repo/wiki.go
+++ b/routers/repo/wiki.go
@@ -209,7 +209,7 @@ func renderWikiPage(ctx *context.Context, isViewPage bool) (*git.Repository, *gi
continue
}
pages = append(pages, PageMeta{
- Name: strings.Replace(name, "-", " ", -1),
+ Name: models.ToWikiPageName(name),
URL: models.ToWikiPageURL(name),
})
}
@@ -361,7 +361,7 @@ func WikiPages(ctx *context.Context) {
continue
}
pages = append(pages, PageMeta{
- Name: name,
+ Name: models.ToWikiPageName(name),
URL: models.ToWikiPageURL(name),
Updated: c.Author.When,
})