Closed Nick8fr32 closed 8 years ago
I made it use decode because lots of users don't decode their cookies before use and reporting problems because of this.
https://github.com/pulviscriptor/agario-client/blob/master/account.js#L50
If you really need % symbol (which i think you don't and you have some problem somewhere setting xs
to some wrong value) you can encode your cookies https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent
Using Regular Expression (in my next PR), we can try to find out if using decodeURIComponent is really necessary.
var find_hex = /\%[0-9A-F]{2}/i;
...
if(xs && xs.match(find_hex)) xs = decodeURIComponent(xs);
This way, chances are more unlikely to get URI malformed
error.
Close this issue if this helps
Updated NPM package to 1.3.7
with DRSDavidSoft's fix.
i get this error when i try to get the tokens??
URIError: URI malformed