diff options
Diffstat (limited to 'routers/repo/wiki.go')
-rw-r--r-- | routers/repo/wiki.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/routers/repo/wiki.go b/routers/repo/wiki.go index 7e52129773..4cea3c890a 100644 --- a/routers/repo/wiki.go +++ b/routers/repo/wiki.go @@ -341,6 +341,11 @@ func NewWikiPost(ctx *context.Context, form auth.NewWikiForm) { return } + if util.IsEmptyString(form.Title) { + ctx.RenderWithErr(ctx.Tr("repo.issues.new.title_empty"), tplWikiNew, form) + return + } + wikiName := models.NormalizeWikiName(form.Title) if err := ctx.Repo.Repository.AddWikiPage(ctx.User, wikiName, form.Content, form.Message); err != nil { if models.IsErrWikiReservedName(err) { |