Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/wiki_page.rb')
-rw-r--r--app/models/wiki_page.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb
index 431c1e33f55..4d8cfd6368f 100644
--- a/app/models/wiki_page.rb
+++ b/app/models/wiki_page.rb
@@ -47,7 +47,11 @@ class WikiPage
# The formatted title of this page.
def title
- @attributes[:title] || ""
+ if @attributes[:title]
+ @attributes[:title].gsub(/-+/, ' ')
+ else
+ ""
+ end
end
# Sets the title of this page.