Closed mathiasbynens closed 9 years ago
I could just re-apply that logic after the compression has happened. Simple fix and doens't rely on a fix in uglify - what do you think?
Sounds good. When (if) this eventually gets fixed in uglifyjs, you can then remove it — or just leave it in anyway.
Damn, looks like I was already doing that: https://github.com/remy/inliner/blob/master/inliner.js#L216
Have you got an example of a url you're hitting? ... unless it's another tag hitting.
Yeah, I edited my bug report right after posting it explaining that you already work around it (partially). You probably read your email notification and missed my clarification — sorry about that. Anyhow, read ^! ;)
[…] unless it's another tag hitting.
It’s not a problem for other tags, only for script
elements. The point is that only escaping the full </script>
string still isn’t completely safe. (See first post in this thread after my edits.)
This should be fixed @ 1.0.0 (but will reopen otherwise!).
You have a workaround in place for an uglify.js bug, which is great. Might be interesting to keep an eye on https://github.com/mishoo/UglifyJS/issues/164 (I’m still hoping this will be fixed in uglify.js itself).
I recently did some ETAGO research, and you can read the full details here: https://mathiasbynens.be/notes/etago Here’s the TL;DR:
In other words, the current workaround only detects one of those three cases.