public static string UnEscape(string str) { StringBuilder sb = new StringBuilder(); int len = str.Length; int i = 0; while (i != len) { if (Uri.IsHexEncoding(str, i)) sb.Append(Uri.HexUnescape(str, ref i)); else sb.Append(str[i++]); } return sb.ToString(); }