Index: trunk/phase3/includes/Title.php |
— | — | @@ -1477,10 +1477,18 @@ |
1478 | 1478 | |
1479 | 1479 | $this->mInterwiki = $this->mFragment = ''; |
1480 | 1480 | $this->mNamespace = $this->mDefaultNamespace; # Usually NS_MAIN |
| 1481 | + |
| 1482 | + $dbkey = $this->mDbkeyform; |
1481 | 1483 | |
| 1484 | + # Strip Unicode bidi override characters. |
| 1485 | + # Sometimes they slip into cut-n-pasted page titles, where the |
| 1486 | + # override chars get included in list displays. |
| 1487 | + $dbkey = str_replace( "\xE2\x80\x8E", '', $dbkey ); // 200E LEFT-TO-RIGHT MARK |
| 1488 | + $dbkey = str_replace( "\xE2\x80\x8F", '', $dbkey ); // 200F RIGHT-TO-LEFT MARK |
| 1489 | + |
1482 | 1490 | # Clean up whitespace |
1483 | 1491 | # |
1484 | | - $dbkey = preg_replace( '/[ _]+/', '_', $this->mDbkeyform ); |
| 1492 | + $dbkey = preg_replace( '/[ _]+/', '_', $dbkey ); |
1485 | 1493 | $dbkey = trim( $dbkey, '_' ); |
1486 | 1494 | |
1487 | 1495 | if ( '' == $dbkey ) { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -381,8 +381,12 @@ |
382 | 382 | * (bug 8231) Gave useful alt text to the main <img> on image pages |
383 | 383 | * (bug 371) Remove alt text for "Enlarge" icon on thumbnails |
384 | 384 | * Initialize user_editcount to 0 instead of NULL for newly created accounts |
| 385 | +* (bug 3696) Strip LRM and RLM characters from titles to work around the |
| 386 | + problem some people have where titles cut-and-pasted from lists include |
| 387 | + the bidi override characters appended to the lists. |
| 388 | + A more thorough blacklist for forbidden and translatable characters would |
| 389 | + be wise, though, as might a cleaner method for the lists in the first place. |
385 | 390 | |
386 | | - |
387 | 391 | == Languages updated == |
388 | 392 | |
389 | 393 | * Basque (eu) |