Index: trunk/phase3/includes/Parser.php |
— | — | @@ -1922,9 +1922,9 @@ |
1923 | 1923 | # Look at the first character |
1924 | 1924 | if( $target != '' && $target{0} == '/' ) { |
1925 | 1925 | # / at end means we don't want the slash to be shown |
1926 | | - if( substr( $target, -1, 1 ) == '/' ) { |
1927 | | - $target = substr( $target, 1, -1 ); |
1928 | | - $noslash = $target; |
| 1926 | + $trailingSlashes = preg_match_all( '%(/+)$%', $target, $m ); |
| 1927 | + if( $trailingSlashes ) { |
| 1928 | + $noslash = $target = substr( $target, 1, -strlen($m[0][0]) ); |
1929 | 1929 | } else { |
1930 | 1930 | $noslash = substr( $target, 1 ); |
1931 | 1931 | } |