.NET HTML whitelisting (anti-xss/Cross Site Scripting)

前端 未结 6 672
日久生厌
日久生厌 2020-12-18 04:51

I\'ve got the common situation where I\'ve got user input that uses a subset of HTML (input with tinyMCE). I need to have some server-side protection against XSS attacks an

6条回答
  •  时光说笑
    2020-12-18 05:09

    We are using the HtmlSanitizer .Net library, which:

    • is open-source
    • is actively maintained
    • doesn't have the problems like Microsoft Anti-XSS library,
    • Is unit tested with the OWASP XSS Filter Evasion Cheat Sheet
    • is special built for this (in contrast to HTML Agility Pack, which is a parser)

    Also on NuGet

提交回复
热议问题