Skip to content

Commit

Permalink
SimpleSuggestions: Don't show quotes in default suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder33445 committed Sep 6, 2022
1 parent 29de184 commit 09b7953
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Control/SimpleSuggestions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace ipl\Web\Control;

use Generator;
use ipl\Html\Attributes;
use ipl\Html\BaseHtmlElement;
use ipl\Html\FormattedString;
Expand Down Expand Up @@ -163,15 +162,15 @@ public function forRequest(ServerRequestInterface $request): self
return $this;
}

$search = $requestData['term']['search'];
$search = str_replace(['"', "'"], '', $requestData['term']['search']);
$label = $requestData['term']['label'];
$exclude = $requestData['exclude'];

$this->setSearchTerm($search);

$this->setData($this->fetchSuggestions($label, $exclude));

if ($search) {
if (! empty($search)) {
$this->setDefault($search);
}

Expand Down

0 comments on commit 09b7953

Please sign in to comment.