From eaca7a01cfe6000ed0cc75241da1428853cdc05d Mon Sep 17 00:00:00 2001 From: aude Date: Fri, 26 Oct 2012 04:10:19 +0000 Subject: [PATCH] (bug 41298) re-apply I9a56b7c6, Don't parse the section's name in the summary Change-Id: I11492200ed8cd199dbbde737a28e8acb07403096 --- includes/EditPage.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 64167d785a..67f0b4670b 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1398,8 +1398,8 @@ class EditPage { // passed. if ( $this->summary === '' ) { $cleanSectionTitle = $wgParser->stripSectionName( $this->sectiontitle ); - $this->summary = wfMessage( 'newsectionsummary', $cleanSectionTitle ) - ->inContentLanguage()->text() ; + $this->summary = wfMessage( 'newsectionsummary' ) + ->rawParams( $cleanSectionTitle )->inContentLanguage()->text(); } } elseif ( $this->summary !== '' ) { // Insert the section title above the content. @@ -1410,8 +1410,8 @@ class EditPage { // Create a link to the new section from the edit summary. $cleanSummary = $wgParser->stripSectionName( $this->summary ); - $this->summary = wfMessage( 'newsectionsummary', $cleanSummary ) - ->inContentLanguage()->text(); + $this->summary = wfMessage( 'newsectionsummary' ) + ->rawParams( $cleanSummary )->inContentLanguage()->text(); } } @@ -1555,16 +1555,16 @@ class EditPage { // passed. if ( $this->summary === '' ) { $cleanSectionTitle = $wgParser->stripSectionName( $this->sectiontitle ); - $this->summary = wfMessage( 'newsectionsummary', $cleanSectionTitle ) - ->inContentLanguage()->text(); + $this->summary = wfMessage( 'newsectionsummary' ) + ->rawParams( $cleanSectionTitle )->inContentLanguage()->text(); } } elseif ( $this->summary !== '' ) { $sectionanchor = $wgParser->guessLegacySectionNameFromWikiText( $this->summary ); # This is a new section, so create a link to the new section # in the revision summary. $cleanSummary = $wgParser->stripSectionName( $this->summary ); - $this->summary = wfMessage( 'newsectionsummary', $cleanSummary ) - ->inContentLanguage()->text(); + $this->summary = wfMessage( 'newsectionsummary' ) + ->rawParams( $cleanSummary )->inContentLanguage()->text(); } } elseif ( $this->section != '' ) { # Try to get a section anchor from the section source, redirect to edited section if header found -- 2.20.1