I need to decode HTML characters in .NET Core (MVC6). It looks like .NET Core doesn't have WebUtility.HtmlDecode function which everybody used for that purpose before. Is there a replacement exist in .NET Core?
This is in the System.Net.WebUtility class (Since .NET Standard 1.0) :
// // Summary: // Provides methods for encoding and decoding URLs when processing Web requests. public static class WebUtility { public static string HtmlDecode(string value); public static string HtmlEncode(string value); public static string UrlDecode(string encodedValue); public static byte[] UrlDecodeToBytes(byte[] encodedValue, int offset, int count); public static string UrlEncode(string value); public static byte[] UrlEncodeToBytes(byte[] value, int offset, int count); }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With