From 29239d07d4ac64d2ab93f7710cacfb79fae8dce1 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Thu, 13 Oct 2022 13:44:25 +0200 Subject: [PATCH] SimpleSuggestions: Remove default suggestion's manually added quotes --- src/Control/SimpleSuggestions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); }