temp hack to restore previous behaviour, re whitespace around fragments
authorTim Starling <tstarling@users.mediawiki.org>
Sat, 9 Dec 2006 15:32:16 +0000 (15:32 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sat, 9 Dec 2006 15:32:16 +0000 (15:32 +0000)
includes/Title.php

index e564eb6..c52ea24 100644 (file)
@@ -571,7 +571,7 @@ class Title {
         * Escape a text fragment, say from a link, for a URL
         */
        static function escapeFragmentForURL( $fragment ) {
-               $fragment = trim( str_replace( ' ', '_', $fragment ), '_' );
+               $fragment = str_replace( ' ', '_', $fragment );
                $fragment = urlencode( Sanitizer::decodeCharReferences( $fragment ) );
                $replaceArray = array(
                        '%3A' => ':',
@@ -1633,7 +1633,7 @@ class Title {
         * @access kind of public
         */
        function setFragment( $fragment ) {
-               $this->mFragment = trim( str_replace( '_', ' ', substr( $fragment, 1 ) ), ' ' );
+               $this->mFragment = str_replace( '_', ' ', substr( $fragment, 1 ) );
        }
 
        /**