]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/search.php
allow any unicode letter and spaces in special terms
[nominatim.git] / website / search.php
index f262a3f168a8fe953f7d50e51b8e96acdc8c23e7..b6e7e24156c0aa904bea8cdd63636d65707d0cbf 100755 (executable)
                                array('county', 9, 13),
                                array('state', 8, 8),
                                array('country', 4, 4),
-                               array('postalcode', 16, 25),
+                               array('postalcode', 5, 11),
                                );
        $aStructuredQuery = array();
        $sAllowedTypesSQLList = '';
                                $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'])
                        {