From 3c9634ce1da3cd38245b29e17fe9fdb2fe2f561c Mon Sep 17 00:00:00 2001 From: yggverse Date: Thu, 21 Mar 2024 22:29:18 +0200 Subject: [PATCH] escape request in query only --- src/webui/search.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/webui/search.php b/src/webui/search.php index 4f85366..be09220 100644 --- a/src/webui/search.php +++ b/src/webui/search.php @@ -150,13 +150,13 @@ switch (true) ); // Escape special chars - $q = @\Manticoresearch\Utils::escape( + $request = @\Manticoresearch\Utils::escape( $q ); // Explode search phrase $words = []; - foreach ((array) explode(' ', $q) as $word) + foreach ((array) explode(' ', $request) as $word) { $words[] = trim( $word @@ -167,7 +167,7 @@ switch (true) $query = $index->search( sprintf( '"%s"|%s', - $q, + $request, implode( '|', $words