js: Only encode new params in `utils.addUrlParams()`

This commit is contained in:
Johannes Meyer 2020-01-15 16:47:30 +01:00
parent 3db65d79c6
commit fdd14c96b1
1 changed files with 3 additions and 3 deletions

View File

@ -133,7 +133,7 @@
$.each(params, function (key, value) {
// We overwrite existing params
newparams[key] = value;
newparams[encodeURIComponent(key)] = encodeURIComponent(value);
});
if (Object.keys(newparams).length) {
@ -143,9 +143,9 @@
queryString += '&';
}
queryString += encodeURIComponent(key);
queryString += key;
if (value !== null) {
queryString += '=' + encodeURIComponent(value);
queryString += '=' + value;
}
});
result += queryString;