r55514 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55513‎ | r55514 | r55515 >
Date:00:45, 23 August 2009
Author:brion
Status:ok
Tags:
Comment:
* (bug 11143) Links containing invalid UTF-8 percent-code sequences are now
cleanly disabled instead of breaking parsing entirely on PHP 5.2.

This was fixed as a side-effect of r55382 for bug 15248; adding comments
in Title::secureAndSplit nothing this.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -2241,6 +2241,9 @@
22422242 $dbkey = preg_replace( '/\xE2\x80[\x8E\x8F\xAA-\xAE]/S', '', $dbkey );
22432243
22442244 # Clean up whitespace
 2245+ # Note: use of the /u option on preg_replace here will cause
 2246+ # input with invalid UTF-8 sequences to be nullified out in PHP 5.2.x,
 2247+ # conveniently disabling them.
22452248 #
22462249 $dbkey = preg_replace( '/[ _\xA0\x{1680}\x{180E}\x{2000}-\x{200B}\x{2028}\x{2029}\x{202F}\x{205F}\x{3000}]+/u', '_', $dbkey );
22472250 $dbkey = trim( $dbkey, '_' );
Index: trunk/phase3/RELEASE-NOTES
@@ -412,6 +412,8 @@
413413 * (bug 15248) Non-breaking spaces and certain other Unicode space characters
414414 are now normalized to ordinary spaces in titles; if your wiki has existing
415415 titles with such characters, run cleanupTitles.php and/or cleanupImages.php
 416+* (bug 11143) Links containing invalid UTF-8 percent-code sequences are now
 417+ cleanly disabled instead of breaking parsing entirely on PHP 5.2.
416418 * (bug 20296) Fixed an PHP warning in Language::getMagic() in PHP 5.3
417419 * When creating accounts, don't prefill name from current username (which
418420 presumably is already taken)

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r55382(bug 15248) Normalize NBSP and other odd Unicode whitespace characters to nor...vyznev14:56, 20 August 2009

Status & tagging log