r113922 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113921‎ | r113922 | r113923 >
Date:15:21, 15 March 2012
Author:maxsem
Status:ok (Comments)
Tags:
Comment:
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.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/EditPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -20,6 +20,8 @@
2121 "movepage-moved"
2222 * (bug 34841) Edit links are no longer displayed when display old page versions
2323 * (bug 34889) User name should be normalized on Special:Contributions
 24+* (bug 35051) If heading has a trailing space after == then its name is not
 25+ preloaded into edit summary on section edit
2426
2527 === Configuration changes in 1.19 ===
2628 * Removed SkinTemplateSetupPageCss hook; use BeforePageDisplay instead.
Index: trunk/phase3/includes/EditPage.php
@@ -1872,7 +1872,7 @@
18731873 * @return Mixed|string or false
18741874 */
18751875 public static function extractSectionTitle( $text ) {
1876 - preg_match( "/^(=+)(.+)\\1(\n|$)/i", $text, $matches );
 1876+ preg_match( "/^(=+)(.+)\\1\\s*(\n|$)/i", $text, $matches );
18771877 if ( !empty( $matches[2] ) ) {
18781878 global $wgParser;
18791879 return $wgParser->stripSectionName( trim( $matches[2] ) );

Follow-up revisions

RevisionCommit summaryAuthorDate
r113923MFT r113922 to 1.19: Bug 35051 - [Regression] If heading has a trailing space...maxsem15:29, 15 March 2012
r113924Follow-up r113922: testsmaxsem15:38, 15 March 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r105380* (bug 32617) Fix for edit summary on section 0 containing a bogus section he...brion23:40, 6 December 2011

Comments

#Comment by Duplicatebug (talk | contribs)   20:20, 15 March 2012

HTML comments are also valid after headers, when the (\n|$) is removed, the old behaviour is back and should not make more bad things than before.

Status & tagging log