X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fsearch%2FSearchDatabase.php;h=643c2c13648dc4381f538aa8f21bf4462957be6d;hp=d51e525b606841d1e78cb4672f0cb8fb11b1ccff;hb=89539f2aa1b158fdcc703ad053e2580cb97a6385;hpb=ea747bb2d4a4f1fadbd57256df6a20037dfc3966 diff --git a/includes/search/SearchDatabase.php b/includes/search/SearchDatabase.php index d51e525b60..643c2c1364 100644 --- a/includes/search/SearchDatabase.php +++ b/includes/search/SearchDatabase.php @@ -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 ) ); } }