From: Max Semenik Date: Thu, 15 Mar 2012 15:21:46 +0000 (+0000) Subject: Bug 35051 - [Regression] If heading has a trailing space after == then its name is... X-Git-Tag: 1.31.0-rc.0~24240 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=632c6281c7435b6292e465050c09722d21f39a47;p=lhc%2Fweb%2Fwiklou.git Bug 35051 - [Regression] If heading has a trailing space after == then its name is not preloaded into edit summary on section edit. Regression from r105380. --- diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index fe22a3a272..771d676289 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -20,6 +20,8 @@ production. "movepage-moved" * (bug 34841) Edit links are no longer displayed when display old page versions * (bug 34889) User name should be normalized on Special:Contributions +* (bug 35051) If heading has a trailing space after == then its name is not + preloaded into edit summary on section edit === Configuration changes in 1.19 === * Removed SkinTemplateSetupPageCss hook; use BeforePageDisplay instead. diff --git a/includes/EditPage.php b/includes/EditPage.php index dc107ad15c..8f4761ca7f 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1872,7 +1872,7 @@ class EditPage { * @return Mixed|string or false */ public static function extractSectionTitle( $text ) { - preg_match( "/^(=+)(.+)\\1(\n|$)/i", $text, $matches ); + preg_match( "/^(=+)(.+)\\1\\s*(\n|$)/i", $text, $matches ); if ( !empty( $matches[2] ) ) { global $wgParser; return $wgParser->stripSectionName( trim( $matches[2] ) );