Index: trunk/phase3/includes/Title.php |
— | — | @@ -2241,6 +2241,9 @@ |
2242 | 2242 | $dbkey = preg_replace( '/\xE2\x80[\x8E\x8F\xAA-\xAE]/S', '', $dbkey ); |
2243 | 2243 | |
2244 | 2244 | # 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. |
2245 | 2248 | # |
2246 | 2249 | $dbkey = preg_replace( '/[ _\xA0\x{1680}\x{180E}\x{2000}-\x{200B}\x{2028}\x{2029}\x{202F}\x{205F}\x{3000}]+/u', '_', $dbkey ); |
2247 | 2250 | $dbkey = trim( $dbkey, '_' ); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -412,6 +412,8 @@ |
413 | 413 | * (bug 15248) Non-breaking spaces and certain other Unicode space characters |
414 | 414 | are now normalized to ordinary spaces in titles; if your wiki has existing |
415 | 415 | 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. |
416 | 418 | * (bug 20296) Fixed an PHP warning in Language::getMagic() in PHP 5.3 |
417 | 419 | * When creating accounts, don't prefill name from current username (which |
418 | 420 | presumably is already taken) |