creeperyang / id3-parser

A pure JavaScript id3 tag parser.
54 stars 13 forks source link

Fix decoding failing for badly escaped characters #6

Closed queicherius closed 8 years ago

queicherius commented 9 years ago

The str çÑÇ encodes into %E7%D1%C7%0A, which throws URIError: URI malformed when using decodeURIComponent .

I am not sure why there is an escape there in the first place, but using encodeURIComponent (like suggested here on the deprecated page) seems to work for all files for me.

creeperyang commented 8 years ago

Thanks for this pull request.

The escape should be replaced with encodeURIComponent. Maybe when I replaced unescape with decodeURIComponent, I forgot to update escape.

I'll merge it after all checks have passed.