fix encoding issue in geocode-API call

This commit is contained in:
Richard Schreiber
2021-02-24 17:52:55 +01:00
parent 71e7d527d1
commit b625d987a9

View File

@@ -19,7 +19,7 @@ $(function () {
return; return;
} }
$sec.find(".col-md-1").html("<span class='fa fa-cog fa-spin'></span>"); $sec.find(".col-md-1").html("<span class='fa fa-cog fa-spin'></span>");
$.getJSON('/control/geocode/?q=' + escape(q), function (res) { $.getJSON('/control/geocode/?q=' + encodeURIComponent(q), function (res) {
var q2 = $.trim($inp.val().replace(/\n/g, ", ")); var q2 = $.trim($inp.val().replace(/\n/g, ", "));
if (q2 !== q) { if (q2 !== q) {
return; // lost race return; // lost race