mirror of
https://github.com/YGGverse/Yo.git
synced 2025-03-13 05:41:18 +00:00
trim extra spaces before query escape
This commit is contained in:
parent
d6b5f8b210
commit
1f27a7e105
@ -140,15 +140,17 @@ switch (true)
|
|||||||
// http://sphinxsearch.com/docs/current/extended-syntax.html
|
// http://sphinxsearch.com/docs/current/extended-syntax.html
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Escape special chars
|
// Remove separator duplicates
|
||||||
$q = @\Manticoresearch\Utils::escape(
|
$q = trim(
|
||||||
$q
|
preg_replace(
|
||||||
|
'/[\s]+/ui',
|
||||||
|
' ',
|
||||||
|
$q
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Remove separator duplicates
|
// Escape special chars
|
||||||
$q = preg_replace(
|
$q = @\Manticoresearch\Utils::escape(
|
||||||
'/[\s]+/ui',
|
|
||||||
' ',
|
|
||||||
$q
|
$q
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user