AntiXSS is an encoding library which uses a safe list approach to encoding. It provides Html, XML, Url, Form, LDAP, CSS, JScript and VBScript encoding methods to allow you to avoid Cross Site Scripting attacks. This library is part of the Microsoft SDL tools.
An AntiXss attribute for Web API request models. It essentially runs the Microsoft AntiXss library against the input and fails validation if the result is different to the original value. There are ways to fine tune and relax where appropriate.