Fix double-wrapped HtmlArmor causing fatals
authorBartosz Dziewoński <matma.rex@gmail.com>
Wed, 26 Sep 2018 13:14:05 +0000 (15:14 +0200)
committerReedy <reedy@wikimedia.org>
Wed, 26 Sep 2018 14:03:38 +0000 (14:03 +0000)
Follow-up to a89ef9b3b9cc4702c0f23443ae51df4f3bed7ecb. I'm guessing
this is supposed to be htmlspecialchars() based on the changes to
other files in that patch (e.g. SpecialAncientpages.php).

Bug: T205469
Change-Id: I52e38a5754b339e1516498e6f0eb73fc8d8df59c

includes/specials/SpecialMostlinkedcategories.php

index 52300f9..56a701a 100644 (file)
@@ -85,7 +85,7 @@ class MostlinkedCategoriesPage extends QueryPage {
                }
 
                $text = MediaWikiServices::getInstance()->getContentLanguage()
-                       ->convert( new HtmlArmor( $nt->getText() ) );
+                       ->convert( htmlspecialchars( $nt->getText() ) );
                $plink = $this->getLinkRenderer()->makeLink( $nt, new HtmlArmor( $text ) );
                $nlinks = $this->msg( 'nmembers' )->numParams( $result->value )->escaped();