Merge "Rename autonym for 'no' from 'norsk bokmål' to 'norsk'"
[lhc/web/wiklou.git] / includes / search / SearchDatabase.php
index d51e525..643c2c1 100644 (file)
@@ -35,7 +35,6 @@ class SearchDatabase extends SearchEngine {
        protected $db;
 
        /**
-        * Constructor
         * @param IDatabase $db The database to search from
         */
        public function __construct( IDatabase $db = null ) {
@@ -53,7 +52,10 @@ class SearchDatabase extends SearchEngine {
         * @return string
         */
        protected function filter( $text ) {
-               $lc = $this->legalSearchChars();
+               // List of chars allowed in the search query.
+               // This must include chars used in the search syntax.
+               // Usually " (phrase) or * (wildcards) if supported by the engine
+               $lc = $this->legalSearchChars( self::CHARS_ALL );
                return trim( preg_replace( "/[^{$lc}]/", " ", $text ) );
        }
 }