From e702a780ede604e90f6300baa795c66696c0a184 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Wed, 4 Apr 2007 16:21:24 +0000 Subject: [PATCH] Since used as regex elsewhere, strip out non-words. --- includes/SearchPostgres.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } } } -- 2.20.1