I have the following in my source HTML:
<head>
...
<script>window.jQuery || document.write('<script src="/js/jquery.min.js"></script>');</script>
...
</head>
But it is getting interpreted by my browser (Chrome) as:
<head>
...
<script>window.jQuery || document.write('<script src="/js/jquery.min.js"></script>
</head>
<body>
"');"
...
I've tried escaping the slash inside the document.write string, but that didn't work. Does anyone know how to prevent the browser from interpreting it as as a closing script tag?