title: Allowing HTML for textarea in MVC for models outside site context
body: <p>I have a description field on a domain model that I want to open up for allowing html.  When I submit the form I get the 'possibly dangerous request' yada.... which I expected but it's proving difficult to remedy with my current setup.</p>
  
  <p>My view model has multiple objects like:</p>
  
  <pre><code>public class MyViewModel
  {
      public ISomething Something { get; set; }
      public IAnotherThing Another { get; set; }
  }
  </code></pre>
  
  <p>Where <code>ISomething</code> contains the description and the interface and class itself is defined in another project from the mvc site.</p>
  
  <p>Although I'm sure I could just add the <code>ValidateInput(false)</code> attribute on the controller action, I don't necessarily want to open everything open...just this particular description.</p>
  
  <p>Anyways, here comes <code>[AllowHtml]</code> which seemed like the answer, but it's defined in <code>System.Web.Mvc</code>. It pains me to add the reference to an external library but I went to bite the bullet and I'm not able to even add that reference since it's not in my available list even though it's in the same solution as the mvc4 application.  </p>
  
  <p>I can't help but imagine that others have been able to overcome this but I appear to have been bested. Any help is very much appreciated!</p>