From 9e6aba6fd27a0281cbeee6ceea03e5051c8040d6 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 9 Sep 2012 15:37:17 +0200 Subject: [PATCH] (bug 40098) Don't parse the section's name in the summary when creating a new section Fix for Ifa80db1d (8d4913e) Change-Id: I9a56b7c6d2e7d0997f92578cbfabbf532bfb07de --- includes/EditPage.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 03918e2d2e..f0b66e1d7b 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1255,8 +1255,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. @@ -1268,8 +1268,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(); } } @@ -1399,16 +1399,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