title: IE10 (in compatibility mode) generates SCRIPT1015: Unterminated string constant error on valid code?
body: <p>I have a few small JQuery scripts in SharePoint that currently use hard-coded paths to include jquery itself and CSS, so they are a pain to move around.</p>
  
  <p>I thought i'd use JS and document.write() to include the files using dynamically generated paths including the site root URL.</p>
  
  <p>Problem: I have a piece of what I think is valid JS code, but IE10 spits it out with an "unterminated string" error. if I change the final <code>'&lt;/script&gt;'</code> string to anything else it works ok (but of course doesn't result in valid html).</p>
  
  <p>The code itself passes JSlint with a few comments about spacing. Javascriptlint.com generates a warning about "script tag must be empty if a path is specified", but I can fix that by setting the variable "imp" in two lines, firstly generating the <code>link</code>tag, then concatenating the <code>script</code> tag.</p>
  
  <p>Code:</p>
  
  <pre><code>&lt;script language="javascript"&gt;
  
    var siteURL= L_Menu_BaseUrl;
  
    var imp= '&lt;link href="' + siteURL + '/SiteAssets/Path/my.css" rel="stylesheet" type="text/css"/&gt;\n'
    +        '&lt;script language="javascript" src="' + siteURL + '/lib/js/jquery-1.9.1_min.js"&gt;' + '&lt;/script&gt;\n';
  
  &lt;/script&gt;
  </code></pre>
  
  <p>I have been staring at this too long, it's probably something really simple. I'm just building an HTML string here but IE seems to be interpreting the final <code>&lt;/script&gt;</code> tag, ignoring the fact that it's a literal string in quotes.</p>
  
  <p>Any ideas?</p>