diff --git a/lib/Search/Query/AQueryParameter.php b/lib/Search/Query/AQueryParameter.php index 00f3838a2..aceeb3486 100644 --- a/lib/Search/Query/AQueryParameter.php +++ b/lib/Search/Query/AQueryParameter.php @@ -37,7 +37,7 @@ class AQueryParameter { public function getValue() { if (is_string($this->value) && mb_strlen($this->value) > 1) { - $param = ($this->value[0] === '"' && $this->value[mb_strlen($this->value) - 1] === '"') ? mb_substr($this->value, 1, -1): $this->value; + $param = (mb_substr($this->value, 0, 1) === '"' && mb_substr($this->value, -1, 1) === '"') ? mb_substr($this->value, 1, -1): $this->value; return $param; } return $this->value; diff --git a/src/store/card.js b/src/store/card.js index bc3238dc3..30c54b52d 100644 --- a/src/store/card.js +++ b/src/store/card.js @@ -92,7 +92,7 @@ export default { const filterOutQuotes = (q) => { if (q[0] === '"' && q[q.length - 1] === '"') { - return q.substr(1, -1) + return q.substr(1, q.length - 2) } return q }