Is there any function that converts an escaped Url string to its unescaped form? System.Web.HttpUtility.UrlDecode()
can do that job but I don\'t want to add a r
@Smith
I was having the save problem. No changes or just further jumbling.
After testing many things I noticed a test string did decode. Ultimately I had to create a new empty string, set it's value to the encoded string then run WebUtility.HtmlDecode
and Uri.UnescapeDataString
on the new string. For some reason I had to run the decode and unescape in the order I mentioned. Bizarre.
I solved it with something like this.
Dim strEncoded as string="http%3a%2f%2fwww.google.com%2fsearch%3fhl%3den%26q%3dsomething%20%2323%26btnG%3dGoogle%2bSearch%26aq%3df%26oq%3d"
Dim strDecoded as string = ""
strDecoded = strEncoded
strDecoded = WebUtility.HtmlDecode(strDecoded)
strDecoded = Uri.UnescapeDataString(strDecoded)