]> git.openstreetmap.org Git - nominatim.git/commitdiff
allow any unicode letter and spaces in special terms
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 7 Apr 2013 15:53:34 +0000 (17:53 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 7 Apr 2013 15:53:34 +0000 (17:53 +0200)
Allows to search for things like [fish shop].

website/search.php

index 5667181bdfe5b7b111643925f53f69d350cf9e28..b6e7e24156c0aa904bea8cdd63636d65707d0cbf 100755 (executable)
                                $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'])
                        {