@@ -1157,7 +1157,7 module ApplicationHelper | |||||
1157 | end |
|
1157 | end | |
1158 |
|
1158 | |||
1159 | def sanitize_anchor_name(anchor) |
|
1159 | def sanitize_anchor_name(anchor) | |
1160 | if ''.respond_to?(:encoding) |
|
1160 | if ''.respond_to?(:encoding) || RUBY_PLATFORM == 'java' | |
1161 | anchor.gsub(%r{[^\p{Word}\s\-]}, '').gsub(%r{\s+(\-+\s*)?}, '-') |
|
1161 | anchor.gsub(%r{[^\p{Word}\s\-]}, '').gsub(%r{\s+(\-+\s*)?}, '-') | |
1162 | else |
|
1162 | else | |
1163 | # TODO: remove when ruby1.8 is no longer supported |
|
1163 | # TODO: remove when ruby1.8 is no longer supported |
General Comments 0
You need to be logged in to leave comments.
Login now