From: Greg Sabino Mullane Date: Wed, 4 Apr 2007 16:21:24 +0000 (+0000) Subject: Since used as regex elsewhere, strip out non-words. X-Git-Tag: 1.31.0-rc.0~53473 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=e702a780ede604e90f6300baa795c66696c0a184;p=lhc%2Fweb%2Fwiklou.git Since used as regex elsewhere, strip out non-words. --- diff --git a/includes/SearchPostgres.php b/includes/SearchPostgres.php index b9e985fd79..3562b3cbf4 100644 --- a/includes/SearchPostgres.php +++ b/includes/SearchPostgres.php @@ -80,7 +80,8 @@ class SearchPostgres extends SearchEngine { } else { $searchstring .= " & $terms[2]"; - array_push( $this->searchTerms, $terms[2] ); + $safeterm = preg_replace('/\W+/', '', $terms[2]); + $this->searchTerms[$safeterm] = $safeterm; } } }