Alternatively, you can use ValidateInput as described here . MVC style example:
[ValidateInput(false)] public ActionResult Method(){ return View() } [ValidateInput(false)] [AcceptVerbs(HttpVerbs.Post)] public ActionResult Method(){
I think this is more than an MVC way. Now your controller tells you that there is a security issue in this controller method. Your presentation can be any normal view using html helpers, etc. Please note that this allows you to use all types of input, rather than filtering. He will work with TinyMCE, though .
//edit
woops I see you need to add
<httpRuntime requestValidationMode="2.0"/>
in webconfig, as well as in newer versions of MVC. I suppose this may not be the way out.
bastijn
source share