Allow User to input HTML in ASP.NET MVC – ValidateInput or AllowHtml

Add the following attribute the action (post) in the controller that you want to allow HTML for: [ValidateInput(false)] Edit: As per Charlino comments: In your web.config set the validation mode used. See MSDN: <httpRuntime requestValidationMode=”2.0″ /> Edit Sept 2014: As per sprinter252 comments: You should now use the [AllowHtml] attribute. See below from MSDN: For … Read more