fix(http): add search param escaping for keys (#9166)

This commit is contained in:
Dmitry Zamula
2016-06-23 04:23:15 +03:00
committed by Rob Wormald
parent 8899b83927
commit a5f2e205ef
2 changed files with 12 additions and 2 deletions

View File

@ -122,8 +122,9 @@ export class URLSearchParams {
toString(): string {
var paramsList: string[] = [];
this.paramsMap.forEach(
(values, k) => { values.forEach(v => paramsList.push(k + '=' + encodeURIComponent(v))); });
this.paramsMap.forEach((values, k) => {
values.forEach(v => paramsList.push(encodeURIComponent(k) + '=' + encodeURIComponent(v)));
});
return paramsList.join('&');
}