Closed josephflu closed 11 years ago
Thanks for the bug report. I've committed the fix along with what seemed to be a missing namespace.
awesome. thx. that was quick. One question, if I pass in a "&" to translate, google gives me back a "&", how do I convert that back to an "&". Is there a utility function in .NET that will do that for me? Right now I have this function which doesn't seem very robust:
private static string DecodeUrlString(string url)
{
string newUrl = url;
newUrl = newUrl.Replace("'", "'").Replace(""", "'")
.Replace("&", "&").Replace(">", ">").Replace("<",
"<"); //TODO: make sure this is comprehensive return newUrl; }
On Tue, Aug 13, 2013 at 12:42 PM, Ian Qvist notifications@github.comwrote:
Thanks for the bug report. I've committed the fix along with what seemed to be a missing namespace.
— Reply to this email directly or view it on GitHubhttps://github.com/Genbox/GoogleTranslate.NET/issues/1#issuecomment-22583441 .
There sure is. Take a look at System.Web.HttpUtility. It has HtmlDecode(), which is what you need.
Perfect, thanks.
On Tue, Aug 13, 2013 at 1:42 PM, Ian Qvist notifications@github.com wrote:
There sure is. Take a look at System.Web.HttpUtility. It has HtmlDecode(), which is what you need.
— Reply to this email directly or view it on GitHubhttps://github.com/Genbox/GoogleTranslate.NET/issues/1#issuecomment-22587637 .
Great library, thanks! Note that this unit test is failing:
TranslateTest()
Here is the corrected unit test: