pub / serci

Search the web with !keywords
git clone https://https://src.jayvii.de/pub/serci.git
Home | Log | Files | Exports | Refs | README | RSS

commit 14461eb338d3c1921d5c8702f67df32dc4a7894a
parent f0e81b0702d9d72937f4ae60f75b9fb8bf50e8ac
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Sat,  6 Jul 2024 21:56:59 +0200

fix: remove preceding and trailing spaces from search string

Diffstat:
Mindex.php | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/index.php b/index.php @@ -37,6 +37,13 @@ if (strlen($query) > 0) { $query ); + /* Remove preceding and trailing spaces */ + $search_term = preg_replace( + '/^\s+|\s+$/', + '', + $search_term + ); + /* Construct search query */ $target = str_replace( '%s',