mirror of
https://github.com/YGGverse/Yo.git
synced 2026-03-31 09:45:30 +00:00
escape request in query only
This commit is contained in:
parent
7390178376
commit
3c9634ce1d
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue