1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-08 07:47:00 +02:00
This commit is contained in:
Ryan Cramer
2025-01-05 10:11:20 -05:00
parent e6ace73c02
commit 00a6baaac9

View File

@@ -1072,9 +1072,9 @@ class Sanitizer extends Wire {
// PHP 7.4+ idn_to_ascii // PHP 7.4+ idn_to_ascii
$info = array(); $info = array();
// 16=IDNA_NONTRANSITIONAL_TO_ASCII // 16=IDNA_NONTRANSITIONAL_TO_ASCII
$value = idn_to_ascii($value, 16, INTL_IDNA_VARIANT_UTS46, $info); idn_to_ascii($value, 16, INTL_IDNA_VARIANT_UTS46, $info);
// IDN return value fails on longer strings, but populates result correctly // IDN return value fails on longer strings, but populates result correctly
if(strlen($_value) >= 50) $value = $info['result']; $value = $info['result'];
} else if($version === 2) { } else if($version === 2) {
// Punycode library // Punycode library