From f5809f30315c5ed00950ac06be4658ecfc8eb4f7 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Fri, 25 Oct 2013 18:44:27 +0200 Subject: [PATCH] Avoid strip markes on transcluded Special:RecentChanges[Linked] OutputPage::wrapWikiText results in a Parser::parse call, which should not be done recursively. Using workaround from the warning under https://www.mediawiki.org?oldid=807703#OutputPage-.3EaddWikiText.28.29 This only was happen, when the special page has no result or for RecentChangesLinked a bad title was given. Bug: 56167 Change-Id: I334bc6c36800af80e311301d46c7d48be1b6a055 --- includes/specials/SpecialRecentchanges.php | 4 ++-- includes/specials/SpecialRecentchangeslinked.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index a42a217142..51e7450600 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -517,8 +517,8 @@ class SpecialRecentChanges extends IncludableSpecialPage { } if ( $rows->numRows() === 0 ) { - $this->getOutput()->wrapWikiMsg( - "
\n$1\n
", 'recentchanges-noresult' + $this->getOutput()->addHtml( + '
' . $this->msg( 'recentchanges-noresult' )->parse() . '
' ); } else { $this->getOutput()->addHTML( $rclistOutput ); diff --git a/includes/specials/SpecialRecentchangeslinked.php b/includes/specials/SpecialRecentchangeslinked.php index a844704639..f37ea20720 100644 --- a/includes/specials/SpecialRecentchangeslinked.php +++ b/includes/specials/SpecialRecentchangeslinked.php @@ -72,7 +72,7 @@ class SpecialRecentchangeslinked extends SpecialRecentChanges { $outputPage = $this->getOutput(); $title = Title::newFromURL( $target ); if ( !$title || $title->getInterwiki() != '' ) { - $outputPage->wrapWikiMsg( "
\n$1\n
", 'allpagesbadtitle' ); + $outputPage->addHtml( '
' . $this->msg( 'allpagesbadtitle' )->parse() . '
' ); return false; } -- 2.20.1