From: Tim Starling Date: Sat, 9 Dec 2006 15:32:16 +0000 (+0000) Subject: temp hack to restore previous behaviour, re whitespace around fragments X-Git-Tag: 1.31.0-rc.0~54953 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=09f671770de24197338c761324a7afcc37645b1d;p=lhc%2Fweb%2Fwiklou.git temp hack to restore previous behaviour, re whitespace around fragments --- diff --git a/includes/Title.php b/includes/Title.php index e564eb6f17..c52ea244c2 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -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 ) ); } /**