]> source.dussan.org Git - redmine.git/commitdiff
Merged r11506 from trunk (#13329).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 9 Mar 2013 11:00:33 +0000 (11:00 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 9 Mar 2013 11:00:33 +0000 (11:00 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.3-stable@11575 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/application_helper.rb

index 6654a7310092e6685145d2884d49664729ed5e28..5670b2462c0218ceb473f6edddbe7f6c488d655b 100644 (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*)?}, '-')