This fixes non-TOC links in IE5, 5.5, and 6 (didn't test 7) when
$wgEnforceHtmlIds is off. These browsers won't follow urlencoded
Unicode anchors in href's, they only work if not urlencoded. Having
non-urlencoded bits in href's should be perfectly fine, correct me if
I'm wrong.
As far as I can tell, Title::escapeFragmentForURL() is never used for
HTTP redirects, if there's any concern about those. The correct
function to fix those is Article::doRedirect(). My testing indicates
that IE{5,5.5,6} will not accept Unicode anchors in anchors in HTTP
redirects, whether urlencoded or not.
*/
static function escapeFragmentForURL( $fragment ) {
global $wgEnforceHtmlIds;
- return wfUrlencode( Sanitizer::escapeId( $fragment,
- $wgEnforceHtmlIds ? array() : 'xml' ) );
+ return Sanitizer::escapeId( $fragment,
+ $wgEnforceHtmlIds ? array() : 'xml' );
}
#----------------------------------------------------------------------------