Handle + sign in URL query string parameters
Opened this issue · 1 comments
wieloch commented
https://github.com/adlnet/xAPIWrapper/blob/master/src/xapiwrapper.js
`// parses the params in the url query string
function parseQueryString()
{
var qs, pairs, pair, ii, parsed;
qs = window.location.search.substr(1);
pairs = qs.split('&');
parsed = {};
for ( ii = 0; ii < pairs.length; ii++) {
pair = pairs[ii].split('=');
if (pair.length === 2 && pair[0]) {
parsed[pair[0]] = decodeURIComponent(pair[1]).replace(/\+/g, " ");
}
}
return parsed;
}`
wieloch commented
This is a common issue, just google decodeURIComponent and plus sign
https://stackoverflow.com/questions/31670413/plus-sign-in-encoded-url