diff options
Diffstat (limited to 'it_html.class')
-rw-r--r-- | it_html.class | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/it_html.class b/it_html.class index 70994e7..d65b101 100644 --- a/it_html.class +++ b/it_html.class @@ -502,7 +502,10 @@ static function U(...$args) $base = preg_replace('|\0|', '', $base); # kill null chars if (!($u = @parse_url($base))) + { + $u = []; 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_replace_callback('/[^-_.0-9a-z\x80-\xff]/i', function($m) { return rawurlencode($m[0]); }, $u['host']); # Encode garbage chars in host |