From 4d2b88dd3eb78eafddba5f093aa55c8572aa3d26 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sun, 7 Apr 2013 17:53:34 +0200 Subject: [PATCH] allow any unicode letter and spaces in special terms Allows to search for things like [fish shop]. --- website/search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/search.php b/website/search.php index 5667181b..b6e7e241 100755 --- a/website/search.php +++ b/website/search.php @@ -308,7 +308,7 @@ $aSpecialTerms[strtolower($aSpecialTerm[1])] = $aSpecialTerm[2]; } - preg_match_all('/\\[([a-zA-Z]*)\\]/', $sQuery, $aSpecialTermsRaw, PREG_SET_ORDER); + preg_match_all('/\\[([\\w ]*)\\]/u', $sQuery, $aSpecialTermsRaw, PREG_SET_ORDER); $aSpecialTerms = array(); if (isset($aStructuredQuery['amenity']) && $aStructuredQuery['amenity']) { -- 2.39.5