Add comment on urlencoding fragments
authorAryeh Gregor <simetrical@users.mediawiki.org>
Mon, 5 Jan 2009 15:59:17 +0000 (15:59 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Mon, 5 Jan 2009 15:59:17 +0000 (15:59 +0000)
includes/Title.php

index 95b2e51..9fd4c79 100644 (file)
@@ -452,6 +452,10 @@ class Title {
         */
        static function escapeFragmentForURL( $fragment ) {
                global $wgEnforceHtmlIds;
+               # Note that we don't urlencode the fragment.  urlencoded Unicode
+               # fragments appear not to work in IE (at least up to 7) or in at least
+               # one version of Opera 9.x.  The W3C validator, for one, doesn't seem
+               # to care if they aren't encoded.
                return Sanitizer::escapeId( $fragment,
                        $wgEnforceHtmlIds ? array() : 'xml' );
        }