ASP.NET MVC3, Html.TextAreaFor without encoding?

前端 未结 3 1456
走了就别回头了
走了就别回头了 2021-01-12 17:15

How can I use the Html.TextAreaForwithout encoding it? I know it\'s a security risk but I have a separate class that sanitizes any text.

Example:

@Html.TextA

3条回答
  •  忘掉有多难
    2021-01-12 17:39

    Use [AllowHtml] on the model property. As I learned in In ASP.NET MVC 3, how do I get at the model using Razor Syntax in a Create() View?.

提交回复
热议问题