Skip to content

Commit

Permalink
Fixed missing encoding via URLSearchParams
Browse files Browse the repository at this point in the history
  • Loading branch information
scarlac committed Sep 2, 2020
1 parent b5b4a70 commit 6544ee8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Libraries/Blob/URL.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ export class URLSearchParams {
return '';
}
const last = this._searchParams.length - 1;
return this._searchParams.reduce((acc, curr, index) => {
return acc + curr.join('=') + (index === last ? '' : '&');
return this._searchParams.reduce((acc, [key, value], index) => {
return `${acc}${key}=${encodeURIComponent(value)}${index === last ? '' : '&'}`;
}, '');
}
}
Expand Down

0 comments on commit 6544ee8

Please sign in to comment.