diff --git a/src/Control/SimpleSuggestions.php b/src/Control/SimpleSuggestions.php index 12cae08f..10cd11f0 100644 --- a/src/Control/SimpleSuggestions.php +++ b/src/Control/SimpleSuggestions.php @@ -70,7 +70,7 @@ public function setData($data): self */ public function setDefault(string $default): self { - $this->default = $default; + $this->default = trim($default, '"\''); return $this; } @@ -176,7 +176,7 @@ public function forRequest(ServerRequestInterface $request): self $this->setData($this->fetchSuggestions($label, $exclude)); - if ($search) { + if (! empty($search)) { $this->setDefault($search); }