Closed yaymukund closed 9 years ago
Whoops, really unusual for me to use escape instead, not entirely sure why i did.
Will merge this and fix a few other things today if I get chance.
And thank you for maintaining this library! It works great :racehorse:
Ah I was just about to merge this and remembered, here's why we used it:
decodeURIComponent('\xD0\xAD')
is capital eth (U+00D0) followed by a soft hyphen (U+00AD).
decodeURIComponent(escape('\xD0\xAD'))
is reversed capital E (U+042D).
decodeURIComponent(encodeURIComponent('\xD0\xAD'))
results in the same as without escape.
The correct result is the reversed capital E.
See the issue here.
Fixed #15 for me (
Uncaught URIError: URI malformed
)escape
is bad practice. See http://stackoverflow.com/a/3608791/1207223