title: wpf webBrowser NavigateToString script error
body: <p>I want to use the Wpf webBrowser control to render math equations.
  I've downloaded MathJax, and included it in my Visual studio project.</p>
  
  <p>I've tryed to load one of the <a href="http://www.mathjax.org/" rel="nofollow">MathJax</a> example. This is the html code i'm using:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;MathJax MathML Test Page&lt;/title&gt;
  &lt;!-- Copyright (c) 2010-2012 Design Science, Inc. --&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
  &lt;meta http-equiv="X-UA-Compatible" content="IE=edge" /&gt;
  
  &lt;script type="text/javascript" src="MathJax-Reduced/unpacked/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full"&gt;&lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;p&gt;
  When
  &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;
    &lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;&amp;#x2260;&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;
  &lt;/math&gt;,
  there are two solutions to
  &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;
    &lt;mi&gt;a&lt;/mi&gt;&lt;msup&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;
    &lt;mo&gt;+&lt;/mo&gt; &lt;mi&gt;b&lt;/mi&gt;&lt;mi&gt;x&lt;/mi&gt;
    &lt;mo&gt;+&lt;/mo&gt; &lt;mi&gt;c&lt;/mi&gt; &lt;mo&gt;=&lt;/mo&gt; &lt;mn&gt;0&lt;/mn&gt;
  &lt;/math&gt;
  and they are
  &lt;math xmlns="http://www.w3.org/1998/Math/MathML" display="block"&gt;
    &lt;mi&gt;x&lt;/mi&gt; &lt;mo&gt;=&lt;/mo&gt;
    &lt;mrow&gt;
      &lt;mfrac&gt;
        &lt;mrow&gt;
          &lt;mo&gt;&amp;#x2212;&lt;/mo&gt;
          &lt;mi&gt;b&lt;/mi&gt;
          &lt;mo&gt;&amp;#x00B1;&lt;/mo&gt;
          &lt;msqrt&gt;
            &lt;msup&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;
            &lt;mo&gt;&amp;#x2212;&lt;/mo&gt;
            &lt;mn&gt;4&lt;/mn&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mi&gt;c&lt;/mi&gt;
          &lt;/msqrt&gt;
        &lt;/mrow&gt;
        &lt;mrow&gt; &lt;mn&gt;2&lt;/mn&gt;&lt;mi&gt;a&lt;/mi&gt; &lt;/mrow&gt;
      &lt;/mfrac&gt;
    &lt;/mrow&gt;
  &lt;/math&gt;
  &lt;/p&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Everything is working fine with the following code:</p>
  
  <pre><code>string curDir = Directory.GetCurrentDirectory();
  this.webBrowser1.Navigate(new Uri(String.Format("file:///{0}/test-1.html", curDir)));
  </code></pre>
  
  <p>But if i try this code:</p>
  
  <pre><code>string s = File.ReadAllText(Directory.GetCurrentDirectory() + "\\test-1.html");
  this.webBrowser1.NavigateToString(s);
  </code></pre>
  
  <p>i get a Script Error:</p>
  
  <pre><code>An error has occurred in the script on this page.
  Line:    1
  Char:    1
  Error:   Syntax Error
  Code:    0
  URL:     about:MathJax-Reduced/unpacked/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full
  </code></pre>
  
  <p>What's wrong? It would be really helpful to use something similar to the last code, so i can avoid to save a file just to load it...</p>