Make sure fragments for Titles are urlencoded
authorAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 1 Jan 2009 01:27:40 +0000 (01:27 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 1 Jan 2009 01:27:40 +0000 (01:27 +0000)
includes/Title.php

index 122d5c2..e6a414a 100644 (file)
@@ -452,8 +452,8 @@ class Title {
         */
        static function escapeFragmentForURL( $fragment ) {
                global $wgEnforceHtmlIds;
-               return Sanitizer::escapeId( $fragment,
-                       $wgEnforceHtmlIds ? array() : 'xml' );
+               return wfUrlencode( Sanitizer::escapeId( $fragment,
+                       $wgEnforceHtmlIds ? array() : 'xml' ) );
        }
 
 #----------------------------------------------------------------------------