From: Sarah Hoffmann Date: Sun, 7 Apr 2013 15:53:34 +0000 (+0200) Subject: allow any unicode letter and spaces in special terms X-Git-Tag: v2.2.0~92 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/4d2b88dd3eb78eafddba5f093aa55c8572aa3d26 allow any unicode letter and spaces in special terms Allows to search for things like [fish shop]. --- 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']) {