(bug 15248) Normalize NBSP and other odd Unicode whitespace characters to normal spaces.
Note: run cleanupTitles.php and cleanupImages.php after deploying this!
This commit is contained in:
parent
52c64d9a7b
commit
9b75e95ef0
2 changed files with 4 additions and 1 deletions
|
|
@ -415,6 +415,9 @@ this. Was used when mwEmbed was going to be an extension.
|
|||
versions of MediaWiki were affected).
|
||||
* (bug 14817) Moving a page to a subpage of itself moves it twice
|
||||
* (bug 20289) $wgMaximumMovedPages should only count pages actually moved
|
||||
* (bug 15248) Non-breaking spaces and certain other Unicode space characters
|
||||
are now normalized to ordinary spaces in titles; if your wiki has existing
|
||||
titles with such characters, run cleanupTitles.php and/or cleanupImages.php
|
||||
|
||||
== API changes in 1.16 ==
|
||||
|
||||
|
|
|
|||
|
|
@ -2242,7 +2242,7 @@ class Title {
|
|||
|
||||
# Clean up whitespace
|
||||
#
|
||||
$dbkey = preg_replace( '/[ _]+/', '_', $dbkey );
|
||||
$dbkey = preg_replace( '/[ _\xA0\x{1680}\x{180E}\x{2000}-\x{200B}\x{2028}\x{2029}\x{202F}\x{205F}\x{3000}]+/u', '_', $dbkey );
|
||||
$dbkey = trim( $dbkey, '_' );
|
||||
|
||||
if ( '' == $dbkey ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue