* (bug 3097) Inconsistently usable titles containing HTML character entities
are now forbidden. A run of cleanupTitles.php will fix up existing pages.
This commit is contained in:
parent
303a3f94f8
commit
a3a2744d03
2 changed files with 14 additions and 2 deletions
|
|
@ -270,6 +270,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
|
||||||
* (bug 8066) Spaces can't be entered in special page aliases
|
* (bug 8066) Spaces can't be entered in special page aliases
|
||||||
* Hide undo link if user can't edit article
|
* Hide undo link if user can't edit article
|
||||||
* (bug 12416) Fix password setting for createAndPromote.php
|
* (bug 12416) Fix password setting for createAndPromote.php
|
||||||
|
* (bug 3097) Inconsistently usable titles containing HTML character entities
|
||||||
|
are now forbidden. A run of cleanupTitles.php will fix up existing pages.
|
||||||
|
|
||||||
|
|
||||||
== Parser changes in 1.12 ==
|
== Parser changes in 1.12 ==
|
||||||
|
|
|
||||||
|
|
@ -1894,8 +1894,18 @@ class Title {
|
||||||
# Initialisation
|
# Initialisation
|
||||||
static $rxTc = false;
|
static $rxTc = false;
|
||||||
if( !$rxTc ) {
|
if( !$rxTc ) {
|
||||||
# % is needed as well
|
# Matching titles will be held as illegal.
|
||||||
$rxTc = '/[^' . Title::legalChars() . ']|%[0-9A-Fa-f]{2}/S';
|
$rxTc = '/' .
|
||||||
|
# Any character not allowed is forbidden...
|
||||||
|
'[^' . Title::legalChars() . ']' .
|
||||||
|
# URL percent encoding sequences interfere with the ability
|
||||||
|
# to round-trip titles -- you can't link to them consistently.
|
||||||
|
'|%[0-9A-Fa-f]{2}' .
|
||||||
|
# XML/HTML character references produce similar issues.
|
||||||
|
'|&[A-Za-z0-9\x80-\xff]+;' .
|
||||||
|
'|&#[0-9]+;' .
|
||||||
|
'|&#x[0-9A-Fa-f]+;' .
|
||||||
|
'/S';
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->mInterwiki = $this->mFragment = '';
|
$this->mInterwiki = $this->mFragment = '';
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue