title: How to get MVC model strings as plain text in views
body: <p>I'm sending a model to a view that have strings.  Those strings are html encoded and I do not need them to be.  Any way to send a model to a view without html encoding?</p>
  
  <p>Model:</p>
  
  <pre><code>public class Package
  {
      public string String { get; set; }
  }
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>public ActionResult GetPackage()
  {
      Package oPackage = new Package();
      oPackage.String = "using lots of \" and ' in this string";
      return View(oPackage);
  }
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>@model Models.Package
  &lt;script type="text/javascript"&gt;
      (function () {
          // Here @Model.String has lots of &amp;#39; and &amp;quot;
          var String = "@Model.String".replace(/&amp;#39;/g, "'").replace(/&amp;quot;/g, "\"");
          // Here String looks ok because I run the two replace functions. But it is possible to just get the string clean into the view?
      })();
  &lt;/script&gt;
  </code></pre>
  
  <p>Running the replace functions is a solution, but just getting the string without the encoding would be great.</p>