What's New in ASP.NET 4.5 and Visual Studio 2012 shows a built in AntiXSS Library ,
<httpRuntime ...
encoderType="System.Web.Security.AntiXss.AntiXssEncoder,System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
@Html.TextBoxFor(x => x.Name, new { @class = "testClass", maxlength = "50" })
It's powerfull , you get
"A potentially dangerous Request.Form value was detected from the client (Name=\"<b> test </b>\").""
for any potentially dangerous detection ,
BUT
What can I do if I want this kind or protection but also allow some HTML content for a wysiwyg html editor? ( forum post for example )