Mime search: Trim leading and trailing whitespace from input
authorChad Horohoe <chadh@wikimedia.org>
Tue, 17 Jun 2014 17:58:39 +0000 (10:58 -0700)
committerChad Horohoe <chadh@wikimedia.org>
Tue, 17 Jun 2014 17:59:29 +0000 (10:59 -0700)
Change-Id: I4f8142224d7585bff65ac3cbab4fce8b302c82bd

includes/specials/SpecialMIMEsearch.php

index 013fc26..a2ae210 100644 (file)
@@ -104,6 +104,7 @@ class MIMEsearchPage extends QueryPage {
                global $wgScript;
 
                $mime = $par ? $par : $this->getRequest()->getText( 'mime' );
+               $mime = trim( $mime );
 
                $this->setHeaders();
                $this->outputHeader();