Skip to content

Commit 3947d89

Browse files
author
Kousuke Ebihara
committed
fixed that the search request parameter doesn't handle double-quotation
1 parent e0f7b0a commit 3947d89

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/api/opAPI.class.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,13 @@ public function addConditionSearchQuery()
240240

241241
if ($this->hasParameter('q'))
242242
{
243-
$list = opToolkit::extractEnclosedStrings($this->getParameter('q'));
243+
$q = $this->getParameter('q');
244+
if ('"' === $q[0] && '"' === $q[strlen($q)-1])
245+
{
246+
$q = substr($q, 1, strlen($q)-2);
247+
}
244248

245-
$token = strtok($list['base'], ' ');
249+
$token = strtok($q, ' ');
246250
while (false !== $token)
247251
{
248252
$isIgnore = false;

0 commit comments

Comments
 (0)