Merge pull request #1317 from yohanboniface/escape_uri_component
Escape URI component in getParamString
This commit is contained in:
commit
39f9e2be10
@ -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('&');
|
||||||
|
Loading…
Reference in New Issue
Block a user