Difference in HTML Encoders in ASP.NET Core

Viewed 101

What is the difference between these 3 different HTML encoding technique available in ASP.NET Core

Class ( we can use Dependencycy Injection)
System.Text.Encodings.Web.HtmlEncoder

Static Method
System.Net.WebUtility.HtmlEncode()
System.Web.HttpUtility.HtmlEncode()

Are they all same and outputs the same encoded string?

0 Answers
Related