@@ -1180,7 +1180,7 module ApplicationHelper | |||||
1180 |
|
1180 | |||
1181 | def sanitize_anchor_name(anchor) |
|
1181 | def sanitize_anchor_name(anchor) | |
1182 | if ''.respond_to?(:encoding) || RUBY_PLATFORM == 'java' |
|
1182 | if ''.respond_to?(:encoding) || RUBY_PLATFORM == 'java' | |
1183 |
anchor.gsub(%r{[^\p{Word} |
|
1183 | anchor.gsub(%r{[^\s\-\p{Word}]}, '').gsub(%r{\s+(\-+\s*)?}, '-') | |
1184 | else |
|
1184 | else | |
1185 | # TODO: remove when ruby1.8 is no longer supported |
|
1185 | # TODO: remove when ruby1.8 is no longer supported | |
1186 | anchor.gsub(%r{[^\w\s\-]}, '').gsub(%r{\s+(\-+\s*)?}, '-') |
|
1186 | anchor.gsub(%r{[^\w\s\-]}, '').gsub(%r{\s+(\-+\s*)?}, '-') |
General Comments 0
You need to be logged in to leave comments.
Login now