0

I'm currently migrating an application to .NET Core. Previously I used the 'HtmlEncode' method from the AntiXSS encoder in System.Web.Security.AntiXSS, but I can't find an equivalent in .NET Core. What should I use instead?

  • When I encode by System.Web.Security.AntiXss.AntiXssEncoder.HtmlEncode("è", true) Then output is: enter image description here

  • When I encode the same in .net core by the System.Web.HttpUtility.HtmlEncode("è") then output is : enter image description here

Please suggest the solution, how can I implement AntiXss encoding in .net core 3.1 code?

eglease
  • 2,107
  • 8
  • 14
  • 25

0 Answers0