Created
October 24, 2018 09:42
-
-
Save SamKr/e5887b0d78789656759053f37302327a to your computer and use it in GitHub Desktop.
Decodes an HTTP URL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string newUrl; | |
var i = 0; | |
while ((newUrl = Uri.UnescapeDataString(url)) != url) | |
{ | |
url = newUrl; | |
i++; | |
if (i > 1000) break; | |
} | |
return newUrl; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment