MDL-60337 htmlpurifier: non-ascii domain names

This commit is contained in:
Marina Glancy
2017-10-03 18:57:11 +08:00
parent d2800e5928
commit a3cc6261fc
3 changed files with 29 additions and 1 deletions
@@ -97,7 +97,7 @@ class HTMLPurifier_AttrDef_URI_Host extends HTMLPurifier_AttrDef
// PHP 5.3 and later support this functionality natively
if (function_exists('idn_to_ascii')) {
$string = idn_to_ascii($string);
$string = idn_to_ascii($string, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
// If we have Net_IDNA2 support, we can support IRIs by
// punycoding them. (This is the most portable thing to do,