i've been working on my code. i wanted to encode my url that includes an underscore, but my code is not working. i've use encodeURICopmponent and it seems that it doesnt include underscore.
requestUrl: encodeURIComponent(uri).replace(/%5F/g),
requestorUrl: document.referrer ? encodeURIComponent(document.referrer) : encodeURIComponent(uri.origin),
You shouldn't encode undescore. But if you want to do it anyway, you can write
To decode: