I tried :
string decodedHtml = HttpUtility.HtmlDecode(html);
Where html is the encoded html. It seems that this does not alter the string at all. The html is still encoded.
The encodeURIComponent() function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two "surrogate" characters).
1. decodeURI function: The decodeURI() function is used to decode URI generated by encodeURI(). Parameters: This function accepts a single parameter complete_encoded_uri_string which holds the encoded string. Return Value: This function returns the decoded string (original string).
HTML DECODE: HTML Decoding is an opposite of encoding process. in decoding process, the specially encoded characters are converted back to their original form. it decodes a string that contains HTML numeric character references and returns the decoded string.
string s = System.Uri.UnescapeDataString(html);
Think you can use this code.
HttpContext.Current.Server.UrlDecode(html)
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