I entered the following in Chrome's console:
decodeURIComponent('a%AFc');
Instead of resulting to a0xAFc
, it caused a URIError exception (malformed uri).
I've heard several excuses why this may be possible, but what I don't understand is why?
The decodeURIComponent()
function in particular is supposed to decode data, not verify the URI.
unescape
is what I need. – Gopherwood