From 4ae787f0f2506c7844dd7572014e9a42feb7742c Mon Sep 17 00:00:00 2001 From: plegall Date: Fri, 12 Apr 2024 09:50:46 +0200 Subject: [PATCH] (cp 16953317d) fixes #2146 trim search by words before anything else --- include/functions_search.inc.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/functions_search.inc.php b/include/functions_search.inc.php index 7ed85862c..73409ce1f 100644 --- a/include/functions_search.inc.php +++ b/include/functions_search.inc.php @@ -1705,6 +1705,8 @@ function split_allwords($raw_allwords) { $words = null; + $raw_allwords = trim($raw_allwords); + if (!preg_match('/^\s*$/', $raw_allwords)) { $drop_char_match = array(';','&','(',')','<','>','`','\'','"','|',',','@','?','%','.','[',']','{','}',':','\\','/','=','\'','!','*');