Generate web page from Database using AllowHtml in Asp.Net Core 2.0

后端 未结 1 1442
盖世英雄少女心
盖世英雄少女心 2020-12-18 10:50

I have an application use Asp.Net 4.61 in which I read html from a database field Description and use it to populate my a page in my application. I do this by marking the p

相关标签:
1条回答
  • 2020-12-18 10:52

    You don't need [AllowHtml] anymore, because nobody denies HTML in ASP.NET Core 2.0:

    Don't need [AllowHtml] or RequestValidationEnabled because we don't have request validation in this system

    Instead, encode the output and Prevent Cross-Site Scripting

    0 讨论(0)
提交回复
热议问题