Now that MVC has introduced HTML encoding through
<%: blah %>
is there any other meaning when using
<%= AntiXSS.HTMLEncode(blah) %>
instead
For example: My application will accept all content (including JavaScript) and store it in it in the raw state in the database. I planned to simply output everything, using something like <%: model.Name %>and relying on the "material" of MVC to make an encoding for me.
Is this method safe enough to rely on AntiXSS, or do I need to use the AntiXSS library explicitly? If I need to use the AntiXSS library, may I ask why this has not already been built into MVC?
source
share