(query)
| 1384 | } |
| 1385 | |
| 1386 | function parseQueryString(query) { |
| 1387 | const params = {}; |
| 1388 | query.split("&").forEach(function(part) { |
| 1389 | const regex = /^(.*?)=(.*)/; |
| 1390 | const match = part.match(regex); |
| 1391 | if (match) { |
| 1392 | const key = decodeURIComponent(match[1]); |
| 1393 | const value = decodeURIComponent(match[2]); |
| 1394 | params[key] = value |
| 1395 | } |
| 1396 | }); |
| 1397 | return params |
| 1398 | } |
| 1399 | |
| 1400 | function encodeIfContainsSpecialChars(value) { |
| 1401 | const specialChars = ":/?#[]@!$'()*+,;=%"; |