Skip to content Skip to sidebar Skip to footer

How Do I Decode HTML That Was Encoded In JS Using EncodeURIComponent()?

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.

Solution 1:

string s = System.Uri.UnescapeDataString(html);

Solution 2:

Think you can use this code.

HttpContext.Current.Server.UrlDecode(html)

Post a Comment for "How Do I Decode HTML That Was Encoded In JS Using EncodeURIComponent()?"