pipes removed from wiki page titles

git-svn-id: http://redmine.rubyforge.org/svn/branches/work@295 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2007-03-04 15:41:14 +00:00
parent fe081828b7
commit eb60359dbe

View File

@@ -36,7 +36,7 @@ class Wiki < ActiveRecord::Base
# turn a string into a valid page title
def self.titleize(title)
# replace spaces with _ and remove unwanted caracters
title = title.gsub(/\s+/, '_').delete(',;') if title
title = title.gsub(/\s+/, '_').delete(',;|') if title
# upcase the first letter
title = title[0..0].upcase + title[1..-1] if title
title