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:
When I encode the same in .net core by the System.Web.HttpUtility.HtmlEncode("è") then output is :
Please suggest the solution, how can I implement AntiXss encoding in .net core 3.1 code?