Index: trunk/phase3/includes/Title.php |
— | — | @@ -2563,7 +2563,7 @@ |
2564 | 2564 | } |
2565 | 2565 | $fragment = strstr( $dbkey, '#' ); |
2566 | 2566 | if ( false !== $fragment ) { |
2567 | | - $this->setFragment( $fragment ); |
| 2567 | + $this->setFragment( preg_replace( '/^#_*/', '#', $fragment ) ); |
2568 | 2568 | $dbkey = substr( $dbkey, 0, strlen( $dbkey ) - strlen( $fragment ) ); |
2569 | 2569 | # remove whitespace again: prevents "Foo_bar_#" |
2570 | 2570 | # becoming "Foo_bar_" |