(bug 2084) Fixed incorrect regex to match redirects
This commit is contained in:
parent
f92501a043
commit
c9bbe3cb03
2 changed files with 2 additions and 1 deletions
|
|
@ -87,6 +87,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
|
|||
* (bug 13298) Tighter limits on Special:Newpages limits when embedding
|
||||
* Email subject in content language instead of sending user's UI language
|
||||
* (bug 13251) Allow maintenance rebuild scripts to work with Postgres
|
||||
* (bug 2084) Fixed incorrect regex to match redirects
|
||||
|
||||
=== API changes in 1.13 ===
|
||||
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ class Title {
|
|||
if( $redir->matchStart( trim($text) ) ) {
|
||||
// Extract the first link and see if it's usable
|
||||
$m = array();
|
||||
if( preg_match( '!\[{2}(.*?)(?:\||\]{2})!', $text, $m ) ) {
|
||||
if( preg_match( '!\[{2}(.*?)(?:\|.*?)?\]{2}!', $text, $m ) ) {
|
||||
// Strip preceding colon used to "escape" categories, etc.
|
||||
// and URL-decode links
|
||||
if( strpos( $m[1], '%' ) !== false ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue