fix geosearch with non-ascii chars (fixes #20)

This commit is contained in:
Stefan Breunig 2013-02-08 00:09:29 +01:00
parent f8d66659f5
commit 290ce87e72

View File

@ -4,7 +4,7 @@
window.setupGeosearch = function() {
$('#geosearch').keypress(function(e) {
if((e.keyCode ? e.keyCode : e.which) != 13) return;
$.getJSON(NOMINATIM + escape($(this).val()), function(data) {
$.getJSON(NOMINATIM + encodeURIComponent($(this).val()), function(data) {
if(!data || !data[0]) return;
var b = data[0].boundingbox;
if(!b) return;