Index: components/search_engines/template_url.cc |
diff --git a/components/search_engines/template_url.cc b/components/search_engines/template_url.cc |
index 8202fa4483c0d7d0569b9bf5da797ff44b1c2f26..2be8e778502e655c6fc9e2da3a2d86892112d859 100644 |
--- a/components/search_engines/template_url.cc |
+++ b/components/search_engines/template_url.cc |
@@ -1217,7 +1217,8 @@ base::string16 TemplateURL::GenerateKeyword(const GURL& url) { |
// Special case: if the host was exactly "www." (not sure this can happen but |
// perhaps with some weird intranet and custom DNS server?), ensure we at |
// least don't return the empty string. |
- base::string16 keyword(net::StripWWWFromHost(url)); |
+ // We do not want any punycode in any language. |
+ base::string16 keyword(net::StripWWW(net::IDNToUnicode(url.host(), ""))); |
Peter Kasting
2015/07/14 18:05:33
I think we should pass the user's accept-languages
alshabalin
2015/07/15 14:18:01
My thought was that a string in a language user do
Peter Kasting
2015/07/15 21:19:12
It seems like you're misunderstanding how the conv
alshabalin
2015/07/16 15:13:07
I thought script-mixing in hostnames is not allowe
alshabalin
2015/07/20 14:06:37
Done.
|
return keyword.empty() ? base::ASCIIToUTF16("www") : keyword; |
} |