X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialMIMEsearch.php;h=e8e5ea0d06b76a248acf20baaf9a57581d43f8cf;hb=699920cc66790c3f5675ffa340c361950ee6225f;hp=f43ed9bd6a83af73ff1c9255be912c61f1bc1e3c;hpb=56d45558b102349f3480a46819669407aa3be2d6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialMIMEsearch.php b/includes/specials/SpecialMIMEsearch.php index f43ed9bd6a..e8e5ea0d06 100644 --- a/includes/specials/SpecialMIMEsearch.php +++ b/includes/specials/SpecialMIMEsearch.php @@ -22,6 +22,8 @@ * @author Ævar Arnfjörð Bjarmason */ +use MediaWiki\MediaWikiServices; + /** * Searches the database for files of the requested MIME type, comparing this with the * 'img_major_mime' and 'img_minor_mime' fields in the image table. @@ -130,6 +132,7 @@ class MIMEsearchPage extends QueryPage { ->setMethod( 'get' ) ->prepareForm() ->displayForm( false ); + return ''; } protected function getSuggestionsForTypes() { @@ -182,14 +185,13 @@ class MIMEsearchPage extends QueryPage { * @return string */ function formatResult( $skin, $result ) { - global $wgContLang; - $linkRenderer = $this->getLinkRenderer(); $nt = Title::makeTitle( $result->namespace, $result->title ); - $text = $wgContLang->convert( $nt->getText() ); + $text = MediaWikiServices::getInstance()->getContentLanguage() + ->convert( htmlspecialchars( $nt->getText() ) ); $plink = $linkRenderer->makeLink( Title::newFromText( $nt->getPrefixedText() ), - $text + new HtmlArmor( $text ) ); $download = Linker::makeMediaLinkObj( $nt, $this->msg( 'download' )->escaped() );