pub / serci

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

commit e26042d07f83fcba4081913e538213908e9e06d7
parent b6c9119aefa07c130e6568a81f4fc590b030087b
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Mon, 25 May 2026 14:24:58 +0200

fix: allow equal signs in keywords and ops

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

diff --git a/index.php b/index.php @@ -54,9 +54,9 @@ } /* Get options from keyword (syntax: !key:opt)*/ - if (preg_match('/\![A-Za-z0-9_\-\.]+:[A-Za-z0-9_\-\.\/]+/', $query) === 1) { + if (preg_match('/\![A-Za-z0-9_\-\.=]+:[A-Za-z0-9_\-\.\/=]+/', $query) === 1) { $keyoption = preg_replace( - '/^.*?\![A-Za-z0-9_\-\.]+:([A-Za-z0-9_\-\.\/]+).*$/', + '/^.*?\![A-Za-z0-9_\-\.=]+:([A-Za-z0-9_\-\.\/=]+).*$/', '${1}', $query ); @@ -69,7 +69,7 @@ /* Strip keyword from search term */ $search_term = preg_replace( - '/\![A-Za-z0-9_\-\.]+:{0,1}[A-Za-z0-9_\-\.\/]*/', + '/\![A-Za-z0-9_\-\.=]+:{0,1}[A-Za-z0-9_\-\.\/=]*/', '', $query );