From 5d5c034a905158bf6a9ce868663e6ee7dad8fc49 Mon Sep 17 00:00:00 2001 From: wn_ Date: Sat, 27 Mar 2021 00:18:05 +0000 Subject: [PATCH] Adjust quotation marks in search query before 'str_getcsv'. This moves a potential first quotation mark to before the associated keyword to ensure 'str_getcsv' groups the key and value correctly. Without this 'str_getcsv' would split on potential spaces within the quoted value. --- classes/feeds.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/classes/feeds.php b/classes/feeds.php index 68d535481..12d6dd65f 100755 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -2054,8 +2054,7 @@ class Feeds extends Handler_Protected { } private static function _search_to_sql($search, $search_language, $owner_uid) { - - $keywords = str_getcsv(trim($search), " "); + $keywords = str_getcsv(preg_replace('/(-?\w+)\:"(\w+)/', '"${1}:${2}', trim($search)), ' '); $query_keywords = array(); $search_words = array(); $search_query_leftover = array();