Skip to content

Commit

Permalink
Merge pull request #27 from Geograph-us/patch-1
Browse files Browse the repository at this point in the history
Fix ReplaceUnicode()
  • Loading branch information
X-rus committed Dec 10, 2015
2 parents 206e4f3 + 32b9f0c commit 863ff15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xNet/Html.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static string ReplaceUnicode(this string str)
return string.Empty;
}

var regex = new Regex(@"\\[uU](?<text>[0-9A-F]{4})", RegexOptions.Compiled);
var regex = new Regex(@"\\u(?<code>[0-9a-f]{4})", RegexOptions.Compiled | RegexOptions.IgnoreCase);

string result = regex.Replace(str, match =>
{
Expand Down Expand Up @@ -583,4 +583,4 @@ public static string[] Substrings(this string str, string left, string right,

#endregion
}
}
}

0 comments on commit 863ff15

Please sign in to comment.