Merge "objectcache: Remove lock()/unlock() stubs from MemcachedClient"
[lhc/web/wiklou.git] / includes / specials / SpecialMIMEsearch.php
index 18c163e..d6ace1d 100644 (file)
@@ -132,6 +132,7 @@ class MIMEsearchPage extends QueryPage {
                        ->setMethod( 'get' )
                        ->prepareForm()
                        ->displayForm( false );
+               return '';
        }
 
        protected function getSuggestionsForTypes() {
@@ -162,6 +163,7 @@ class MIMEsearchPage extends QueryPage {
        }
 
        public function execute( $par ) {
+               $this->addHelpLink( 'Help:Managing_files' );
                $this->mime = $par ?: $this->getRequest()->getText( 'mime' );
                $this->mime = trim( $this->mime );
                list( $this->major, $this->minor ) = File::splitMime( $this->mime );
@@ -186,10 +188,11 @@ class MIMEsearchPage extends QueryPage {
        function formatResult( $skin, $result ) {
                $linkRenderer = $this->getLinkRenderer();
                $nt = Title::makeTitle( $result->namespace, $result->title );
-               $text = MediaWikiServices::getInstance()->getContentLanguage()->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() );