mathiasbynens / he

A robust HTML entity encoder/decoder written in JavaScript.
https://mths.be/he
MIT License
3.43k stars 255 forks source link

Parser issue on IE after JS minification. #40

Closed gsaini closed 8 years ago

mathiasbynens commented 8 years ago

Which version of IE? What error are you getting?

gsaini commented 8 years ago

I meet the issue on IE10, IE11 as Illegal character at column 1746 somewhere at key as ^ in encodeMap variable without string quotes.

anko commented 8 years ago

What minifier did you use? Does this only happen on IE?

A minimal test case would help.

gsaini commented 8 years ago

Yes. It's IE specific issue. I am using r.js to minify JS. I used the minified version from cdnjs as well it also have the same issue.

mathiasbynens commented 8 years ago

@gsaini Is he available on Google CDN? That is new to me.

gsaini commented 8 years ago

I used the below cdnjs url... https://cdnjs.cloudflare.com/ajax/libs/he/0.5.0/he.min.js

gsaini commented 8 years ago

@mathiasbynens - Any update??

anko commented 8 years ago

@gsaini Does the non-minified version at https://cdnjs.cloudflare.com/ajax/libs/he/0.5.0/he.js work?

If it does, then the problem is with some minification that cdnjs is doing independently (which is out of our control) so you might want to raise this on the cdnjs issue tracker instead.

gsaini commented 8 years ago

@anko - Yes it is some JS minification related issue which needs to fix for IE. I minified it with r.js (RequireJS) build system as well but it has the same issue on IE after minification.