diff options
author | Christian Schneider | 2022-12-12 16:55:47 +0100 |
---|---|---|
committer | Christian Schneider | 2022-12-12 16:55:47 +0100 |
commit | 55bd4e0052b830256ad1d1134bbe5c7231d1427b (patch) | |
tree | 49d4980bb599db87085b75c7780dc6138ad681db /it_html.class | |
parent | d6f07d7e1350c57e59192ba0047a8431fc59cdf3 (diff) | |
download | itools-55bd4e0052b830256ad1d1134bbe5c7231d1427b.tar.gz itools-55bd4e0052b830256ad1d1134bbe5c7231d1427b.tar.bz2 itools-55bd4e0052b830256ad1d1134bbe5c7231d1427b.zip |
Add and use it::utf8_decode and it::utf8_encode for easier migration to PHP 8.2
Diffstat (limited to 'it_html.class')
-rw-r--r-- | it_html.class | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/it_html.class b/it_html.class index 8254c22..93057bd 100644 --- a/it_html.class +++ b/it_html.class @@ -511,7 +511,7 @@ static function U(...$args) list($u['path'], $u['query']) = explode("?", $base, 2); } - $u['host'] = preg_match('/[^-_.0-9a-z]/i', $u['host']) && function_exists('idn_to_ascii') && ($idnahost = idn_to_ascii($GLOBALS['it_html']->p['charset'] == "iso-8859-1" ? utf8_encode($u['host']) : $u['host'])) ? $idnahost : $u['host']; # Punycode hostname to include into webpage + $u['host'] = preg_match('/[^-_.0-9a-z]/i', $u['host']) && function_exists('idn_to_ascii') && ($idnahost = idn_to_ascii($GLOBALS['it_html']->p['charset'] == "iso-8859-1" ? it::utf8_encode($u['host']) : $u['host'])) ? $idnahost : $u['host']; # Punycode hostname to include into webpage $u['host'] = preg_replace_callback('/[^-_.0-9a-z\x80-\xff]/i', function($m) { return rawurlencode($m[0]); }, $u['host']); # Encode garbage chars in host # handle scheme, user (urlencoded), password, host |