From: Aaron Schulz Date: Thu, 13 Mar 2008 14:08:47 +0000 (+0000) Subject: Allow leading whitespace in redirect matches (bug 13344) X-Git-Tag: 1.31.0-rc.0~49139 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=92b6da193a9c124ab8469f1e158af0acfb77ae8a;p=lhc%2Fweb%2Fwiklou.git Allow leading whitespace in redirect matches (bug 13344) --- diff --git a/includes/Title.php b/includes/Title.php index d6d763b508..c07518ad45 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -285,7 +285,7 @@ class Title { */ public static function newFromRedirect( $text ) { $redir = MagicWord::get( 'redirect' ); - if( $redir->matchStart( $text ) ) { + if( $redir->matchStart( trim($text) ) ) { // Extract the first link and see if it's usable $m = array(); if( preg_match( '!\[{2}(.*?)(?:\||\]{2})!', $text, $m ) ) {