convert to punycode for feed on idn hostname
This commit is contained in:
parent
832aa24943
commit
62958fe9dc
|
@ -1776,6 +1776,16 @@
|
||||||
$url .= '/';
|
$url .= '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//convert IDNA hostname to punycode if possible
|
||||||
|
if (function_exists("idn_to_ascii")) {
|
||||||
|
$parts = parse_url($url);
|
||||||
|
if (mb_detect_encoding($parts['host']) != 'ASCII')
|
||||||
|
{
|
||||||
|
$parts['host'] = idn_to_ascii($parts['host']);
|
||||||
|
$url = build_url($parts);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($url != "http:///")
|
if ($url != "http:///")
|
||||||
return $url;
|
return $url;
|
||||||
else
|
else
|
||||||
|
|
|
@ -317,6 +317,10 @@
|
||||||
array_push($notices, "CURL and open_basedir combination breaks support for HTTP redirects. See the FAQ for more information.");
|
array_push($notices, "CURL and open_basedir combination breaks support for HTTP redirects. See the FAQ for more information.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!function_exists("idn_to_ascii")) {
|
||||||
|
array_push($notices, "PHP support for Internationalization Functions is required to handle Internationalized Domain Names.");
|
||||||
|
}
|
||||||
|
|
||||||
if (count($notices) > 0) {
|
if (count($notices) > 0) {
|
||||||
print_notice("Configuration check succeeded with minor problems:");
|
print_notice("Configuration check succeeded with minor problems:");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue