jenkins-bot has submitted this change and it was merged.

Change subject: Avoid strip markes on transcluded Special:RecentChanges[Linked]
......................................................................


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
---
M includes/specials/SpecialRecentchanges.php
M includes/specials/SpecialRecentchangeslinked.php
2 files changed, 3 insertions(+), 3 deletions(-)

Approvals:
  IAlex: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/specials/SpecialRecentchanges.php 
b/includes/specials/SpecialRecentchanges.php
index a42a217..51e7450 100644
--- a/includes/specials/SpecialRecentchanges.php
+++ b/includes/specials/SpecialRecentchanges.php
@@ -517,8 +517,8 @@
                }
 
                if ( $rows->numRows() === 0 ) {
-                       $this->getOutput()->wrapWikiMsg(
-                               "<div 
class='mw-changeslist-empty'>\n$1\n</div>", 'recentchanges-noresult'
+                       $this->getOutput()->addHtml(
+                               '<div class="mw-changeslist-empty">' . 
$this->msg( 'recentchanges-noresult' )->parse() . '</div>'
                        );
                } else {
                        $this->getOutput()->addHTML( $rclistOutput );
diff --git a/includes/specials/SpecialRecentchangeslinked.php 
b/includes/specials/SpecialRecentchangeslinked.php
index a844704..f37ea20 100644
--- a/includes/specials/SpecialRecentchangeslinked.php
+++ b/includes/specials/SpecialRecentchangeslinked.php
@@ -72,7 +72,7 @@
                $outputPage = $this->getOutput();
                $title = Title::newFromURL( $target );
                if ( !$title || $title->getInterwiki() != '' ) {
-                       $outputPage->wrapWikiMsg( "<div 
class=\"errorbox\">\n$1\n</div>", 'allpagesbadtitle' );
+                       $outputPage->addHtml( '<div class="errorbox">' . 
$this->msg( 'allpagesbadtitle' )->parse() . '</div>' );
                        return false;
                }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/91889
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I334bc6c36800af80e311301d46c7d48be1b6a055
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
Gerrit-Reviewer: Brian Wolff <[email protected]>
Gerrit-Reviewer: IAlex <[email protected]>
Gerrit-Reviewer: Liangent <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: Tim Starling <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to