miketaylr / urlgrep

A tool to inline a given resources external CSS and JS assets.
3 stars 0 forks source link

silly js escapes #5

Closed miketaylr closed 10 years ago

miketaylr commented 10 years ago
navigator.userAgent.indexOf("MSIE")&&(0<=navigator.userAgent.indexOf("Windows 95")||0<=navigator.userAgent.indexOf("Windows 98")||0<=navigator.userAgent.indexOf("Windows NT"))
miketaylr commented 10 years ago

Fixed by https://github.com/miketaylr/urlgrep/commit/9d71f9f76fe955f7a1407d015caff41027bb8d09. The issue is that BeautifulSoup 3.2.1 has a bug that encodes symbols into HTML entities, even if it's a JS string. This gets fixed by bs4... but bs4 is incompatible with gumbo. So rather than try to sort all of that out, this cheats by wrapping the (unsouped) strings in ~script~ and ~/script~ (same for style). Not awesome, but given that the point of this tool is to grep what's in between those I can live with it.