Merged r11506 from trunk (#13329).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.3-stable@11575 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2013-03-09 11:00:33 +00:00
parent 53680edb2d
commit b0b7f4d7d6
1 changed files with 1 additions and 1 deletions

View File

@ -1180,7 +1180,7 @@ module ApplicationHelper
def sanitize_anchor_name(anchor)
if ''.respond_to?(:encoding) || RUBY_PLATFORM == 'java'
anchor.gsub(%r{[^\p{Word}\s\-]}, '').gsub(%r{\s+(\-+\s*)?}, '-')
anchor.gsub(%r{[^\s\-\p{Word}]}, '').gsub(%r{\s+(\-+\s*)?}, '-')
else
# TODO: remove when ruby1.8 is no longer supported
anchor.gsub(%r{[^\w\s\-]}, '').gsub(%r{\s+(\-+\s*)?}, '-')