Index: trunk/phase3/includes/Title.php |
— | — | @@ -2047,8 +2047,7 @@ |
2048 | 2048 | # Strip Unicode bidi override characters. |
2049 | 2049 | # Sometimes they slip into cut-n-pasted page titles, where the |
2050 | 2050 | # override chars get included in list displays. |
2051 | | - $dbkey = str_replace( "\xE2\x80\x8E", '', $dbkey ); // 200E LEFT-TO-RIGHT MARK |
2052 | | - $dbkey = str_replace( "\xE2\x80\x8F", '', $dbkey ); // 200F RIGHT-TO-LEFT MARK |
| 2051 | + $dbkey = preg_replace( '/\xE2\x80[\x8E\x8F\xAA-\xAE]/S', '', $dbkey ); |
2053 | 2052 | |
2054 | 2053 | # Clean up whitespace |
2055 | 2054 | # |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -369,6 +369,10 @@ |
370 | 370 | * Honour unchecked "Leave a redirect behind" for moved subpages |
371 | 371 | * (bug 16440) Broken 0-byte math renderings are now deleted and re-rendered |
372 | 372 | when page is re-parsed. |
| 373 | +* (bug 6100) Unicode BiDi embedding/override characters (U+202A - U+202E) are |
| 374 | + now automatically removed from titles; these characters can accidentally end |
| 375 | + up in copy-and-pasted titles, and, by overriding normal bidirectional text |
| 376 | + handling, can lead to annoying behavior such as text rendering backwards |
373 | 377 | |
374 | 378 | === API changes in 1.14 === |
375 | 379 | |