Update AdvancedSearchQueryTerm.php
Fixed the use case: quoted keywords cotain \
This commit is contained in:
parent
4822f74362
commit
1805404b00
1 changed files with 9 additions and 2 deletions
|
|
@ -309,8 +309,15 @@ class AdvancedSearchQueryTerm {
|
||||||
$value = "!" . str_replace('"', "", trim($value));
|
$value = "!" . str_replace('"', "", trim($value));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// one word
|
// Case 2: keywords is one word
|
||||||
$value = str_replace('"', "", trim($value));
|
// if there is quotation (with backslash) surrounded,
|
||||||
|
if (strpos(trim($value), '\"' ) !== false) {
|
||||||
|
$value = str_replace('\"', "", trim($value));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// if there is quotation (without backslash) surrounded
|
||||||
|
$value = str_replace('"', "", trim($value));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue