Skip to content

Commit 0eebfb8

Browse files
committed
Fix: Decode percent-encoded keys and values in parseQueryString
1 parent 827f5b3 commit 0eebfb8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Sprint-2/implement/querystring.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ function parseQueryString(queryString) {
2222
const value = eqIndex === -1 ? "" : segment.slice(eqIndex + 1);
2323

2424
if (key) {
25-
queryParams[key] = value;
25+
// Decode percent-encoded characters in both key and value
26+
queryParams[decodeURIComponent(key)] = decodeURIComponent(value);
2627
}
2728
}
2829

0 commit comments

Comments
 (0)