Removes spaces in versions anchors.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8560 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-01-08 17:14:17 +00:00
parent 3ed0c93857
commit f1b93601b5
2 changed files with 6 additions and 2 deletions

View File

@@ -328,6 +328,10 @@ module ApplicationHelper
end
end
def anchor(text)
text.to_s.gsub(' ', '_')
end
def html_hours(text)
text.gsub(%r{(\d+)\.(\d+)}, '<span class="hours hours-int">\1</span><span class="hours hours-dec">.\2</span>').html_safe
end