X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecialpage%2FPageQueryPage.php;h=2f15800b5ab71b1bc05d01a092ff272e99495a1e;hb=f6207905dc68b4a890450d11e6833a9979051a2b;hp=7d6db0544d194e0ec443c5fd961bdbac75efd0b3;hpb=008062c87cb4b400fcb5df0caf137bf2964a28e3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specialpage/PageQueryPage.php b/includes/specialpage/PageQueryPage.php index 7d6db0544d..2f15800b5a 100644 --- a/includes/specialpage/PageQueryPage.php +++ b/includes/specialpage/PageQueryPage.php @@ -21,6 +21,7 @@ * @ingroup SpecialPage */ +use MediaWiki\MediaWikiServices; use Wikimedia\Rdbms\IResultWrapper; use Wikimedia\Rdbms\IDatabase; @@ -50,13 +51,12 @@ abstract class PageQueryPage extends QueryPage { * @return string */ public function formatResult( $skin, $row ) { - global $wgContLang; - $title = Title::makeTitleSafe( $row->namespace, $row->title ); if ( $title instanceof Title ) { - $text = $wgContLang->convert( $title->getPrefixedText() ); - return $this->getLinkRenderer()->makeLink( $title, $text ); + $text = MediaWikiServices::getInstance()->getContentLanguage()-> + convert( htmlspecialchars( $title->getPrefixedText() ) ); + return $this->getLinkRenderer()->makeLink( $title, new HtmlArmor( $text ) ); } else { return Html::element( 'span', [ 'class' => 'mw-invalidtitle' ], Linker::getInvalidTitleDescription( $this->getContext(), $row->namespace, $row->title ) );