Escape URI component in getParamString

This commit is contained in:
Yohan Boniface 2013-01-26 17:47:28 +01:00
parent 80413f4040
commit c432c4eb24

View File

@ -81,7 +81,7 @@ L.Util = {
var params = []; var params = [];
for (var i in obj) { for (var i in obj) {
if (obj.hasOwnProperty(i)) { if (obj.hasOwnProperty(i)) {
params.push(i + '=' + obj[i]); params.push(encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]));
} }
} }
return ((!existingUrl || existingUrl.indexOf('?') === -1) ? '?' : '&') + params.join('&'); return ((!existingUrl || existingUrl.indexOf('?') === -1) ? '?' : '&') + params.join('&');