* @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
*/
+use MediaWiki\MediaWikiServices;
use Wikimedia\Rdbms\IResultWrapper;
use Wikimedia\Rdbms\IDatabase;
* @return string
*/
function formatResult( $skin, $result ) {
- global $wgContLang;
-
$nt = Title::makeTitleSafe( NS_CATEGORY, $result->title );
if ( !$nt ) {
return Html::element(
);
}
- $text = $wgContLang->convert( $nt->getText() );
- $plink = $this->getLinkRenderer()->makeLink( $nt, $text );
+ $text = MediaWikiServices::getInstance()->getContentLanguage()
+ ->convert( htmlspecialchars( $nt->getText() ) );
+ $plink = $this->getLinkRenderer()->makeLink( $nt, new HtmlArmor( $text ) );
$nlinks = $this->msg( 'nmembers' )->numParams( $result->value )->escaped();
return $this->getLanguage()->specialList( $plink, $nlinks );