Skip to content

Commit b10058d

Browse files
author
russom
committed
decodeURLComponent function used to decode percent-encoded characters test
1 parent d5c28aa commit b10058d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎Sprint-2/implement/querystring.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ function parseQueryString(queryString) {
77

88
for (const pair of keyValuePairs) {
99
if (!pair) {
10-
continue;
10+
continue;
1111
}
1212
const everything = pair.split("=");
13-
const key = everything.shift();
14-
const value = everything.join("=");
13+
const key = decodeURIComponent(everything.shift());
14+
const value = decodeURIComponent(everything.join("="));
1515
queryParams[key] = value;
1616
}
1717

0 commit comments

Comments
 (0)