I have email addresses encoded with HTML character entities. Is there anything in .NET that can convert them to plain strings?
Converts a string that has been HTML-encoded for HTTP transmission into a decoded string. Converts a string that has been HTML-encoded into a decoded string, and sends the decoded string to a TextWriter output stream.
You can use HttpUtility.HtmlDecode
If you are using .NET 4.0+ you can also use WebUtility.HtmlDecode
which does not require an extra assembly reference as it is available in the System.Net
namespace.
On .Net 4.0:
System.Net.WebUtility.HtmlDecode()
No need to include assembly for a C# project
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