Can anyone show me an example of how to HTML encode text with the HtmlEncoder
class in the System.Text.Encodings.Web
namespace?
I'm converting an ASP.NET Core RC1 project to RC2. In the RC1 project I'm using the HtmlEncoder
class in the Microsoft.Extensions.WebEncoders
namespace. But there is no RC2 update for that.
According to this GitHub post Microsoft.Extensions.WebEncoders
has been moved to System.Text.Encodings.Web
. But the HtmlEncoder
class in this new namespace is an abstract class and I can't find an implementation of it.