Is use of AntiXss library necess开发者_开发知识库ary/recommended in mvc 3 razor application? Where can I find out more about encoding options for mvc 3?
Razor automatically encodes the output to prevent XSS. If you need to output HTML mark-up then you can use the @Html.Raw(myVariable)
method or make sure the variables you need to not be encoded are of type HtmlString
.
精彩评论