title: IE not working SCRIPT5007 HTML1524 errors, possibly doctype needs to be revised?
body: <p>I have an application that receives input words from a web app and processes them on the backend (can be done with ruby or node.js) and returns the words back to the screen in uppercase.  This works fine for Firefox, but does not work for IE.. tried IE 9 &amp; 10.  When I say, does not work I mean the response is not returned to the webpage and instead the user eventually sees the timeout error although the backend application is working. </p>
  
  <p>These are the types of errors I see.  The failure occurs when this function is called: </p>
  
  <pre><code>function escapeHtml(text) {
      return text
  </code></pre>
  
  <blockquote>
    <p>SCRIPT5007: Unable to get property 'replace' of undefined or null
    reference  index.html</p>
  </blockquote>
  
  <p>But earlier when the page loads, I see these errors which I think may be the real problem;  it seems as if the "text" is not able to be returned because the doctype and/or codepage is causing the problem. </p>
  
  <blockquote>
    <p>HTML1524: Invalid DOCTYPE. The shortest valid doctype is "".  index.html, line 1 character 1 HTML1114: Codepage utf-8 from
    (HTTP header) overrides conflicting codepage iso-8859-1 from (META
    tag)</p>
  </blockquote>
  
  <p>I have done several searches but mostly they show the doc type I am using to be valid, so I am at a loss as to why this continues to be a problem in IE.</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"   
                        "http://www.w3.org/TR/html4/loose.dtd"&gt;
  
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
  &lt;link href="style.css" rel="stylesheet" type="text/css" /&gt;
  </code></pre>