Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private string parse(string Url)
- {
- Uri url = new Uri(Url);
- if (string.IsNullOrEmpty(url.Query))
- {
- return Url;
- }
- if (string.IsNullOrEmpty(url.PathAndQuery))
- {
- return Url;
- }
- string query = url.Query;
- string path = url.AbsolutePath;
- string scheme = url.Scheme;
- string host = url.Host;
- string[] arr = query.Split('&');
- string[] x = new string[arr.Length];
- for (int a = 0; a < arr.Length; a++)
- {
- x[a] = arr[a].Replace(arr[a], arr[a] + HttpUtility.UrlEncode("'"));
- }
- string url_ = scheme + "://" + host + path + string.Join("&", x);
- return url_;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement