(bug 41298) re-apply I9a56b7c6, Don't parse the section's name in the summary
authoraude <aude.wiki@gmail.com>
Fri, 26 Oct 2012 04:10:19 +0000 (04:10 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 26 Oct 2012 13:58:26 +0000 (13:58 +0000)
Change-Id: I11492200ed8cd199dbbde737a28e8acb07403096

includes/EditPage.php

index 64167d7..67f0b46 100644 (file)
@@ -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