From 92b6da193a9c124ab8469f1e158af0acfb77ae8a Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 13 Mar 2008 14:08:47 +0000 Subject: [PATCH] Allow leading whitespace in redirect matches (bug 13344) --- includes/Title.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ) ) { -- 2.20.1