r45416 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45415‎ | r45416 | r45417 >
Date:15:59, 5 January 2009
Author:simetrical
Status:ok
Tags:
Comment:
Add comment on urlencoding fragments
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -452,6 +452,10 @@
453453 */
454454 static function escapeFragmentForURL( $fragment ) {
455455 global $wgEnforceHtmlIds;
 456+ # Note that we don't urlencode the fragment. urlencoded Unicode
 457+ # fragments appear not to work in IE (at least up to 7) or in at least
 458+ # one version of Opera 9.x. The W3C validator, for one, doesn't seem
 459+ # to care if they aren't encoded.
456460 return Sanitizer::escapeId( $fragment,
457461 $wgEnforceHtmlIds ? array() : 'xml' );
458462 }

Status & tagging log