-
Notifications
You must be signed in to change notification settings - Fork 47.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace '\uFEFF' with '!' for setInnerHTML to avoid UglifyJS bug #2249
Conversation
This code path is only for IE8, correct? |
@zpao Knowingly, it exclusively targets IE8 only and it's most definitely safe (I used an ASCII-char at the start). So as I mentioned on IRC; this PR is safe to pull. ... but I've found that |
I've opened #2273 to track the status of |
Remind me why in #684 we didn't decide to manually insert a whitespace text node at the beginning of the markup like jQuery does in IE8? That feels cleaner to me than inserting an extra character only to remove it immediately. |
@spicyj Hmm, not sure if I agree, fiddeling with textnodes seems more low-level than just prepending a char and removing it. Unless I misunderstand how jQuery does it. |
PS. Also it doesn't really matter, we should be going the way of #2273 instead I think ( |
I've submitted #2340 which should be preferable. |
Since we're not rushing this, we should do it properly with #2340 instead. |
#2247 (and mishoo/UglifyJS#556)
This is obviously quite a serious bug and even if uglifyjs fixes it, old versions will still be around to haunt people who minify themselves.
The comment should explain everything. The char is immediately removed so it should never affect rendering.
Test plan: none (should test in IE8)
cc @zpao @spicyj