Is using the AntiXss library necessary / recommended in the mvc 3 razor app

Is the use of the AntiXss library necessary / recommended in the mvc 3 razor app? Where can I find out more about encoding options for mvc 3?

+4
source share
1 answer

Razor automatically encodes output to prevent XSS. If you need to output HTML markup, you can use the @Html.Raw(myVariable) method or make sure that the variables you need not to encode are of type HtmlString .

+3
source

Source: https://habr.com/ru/post/1347900/


All Articles