title: Wrong text encoding in string sent to javascript
body: <p>I have a javascript method which is receiving a UTF-8 encoded string (ViewBag.errorText), and uses this as a parameter to a new function.</p>
  
  <p>The problem is that the text displayed in <code>show_error_dialog</code> is displaying the html escaped characters (<code>&amp;#230;&amp;#248</code> etc') and not the intended ("æåø" etc.).</p>
  
  <p>I presume the problem is the enclosed <code>&lt;text&gt;</code> tags but can't seem to get around this.</p>
  
  <pre><code>&lt;script type="text/javascript" charset="utf-8"&gt;
      function performLoadOperations() {
          @if(ViewBag.errorText!= null) {
              &lt;text&gt;show_error_dialog('@ViewBag.errorText');&lt;/text&gt;
          }
      }
  &lt;/script&gt;
  </code></pre>