I'm inlining a large JS program, which includes a line of code like :
doc.write("<script>var app = \"" + _2d() + "\";</script>");
Unfortunately the browser (chrome) thinks the script in the string is the closing script tag, and actually takes everything after that like its HTML text.
How do I include such a string and escape it so it does not confuse the browser HTML parsing?
<\/script>.