diff options
Diffstat (limited to 'it_html.class')
-rw-r--r-- | it_html.class | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/it_html.class b/it_html.class index e874ef4..20b0c75 100644 --- a/it_html.class +++ b/it_html.class @@ -529,7 +529,7 @@ static function U(/* ... */) # handle scheme, user (urlencoded), password, host $hostpart = - ($u['user'] ? preg_replace_callback('|[^-a-z0-9_.+!*(),:?@&=/~$%#]|i', function($m) { return urlencode($m[0]); }, $u['user'] . ($u['pass'] ? ":" . $u['pass'] : "") . "@") : "") . + ($u['user'] ? preg_replace_callback('|[^-a-z0-9_.+!*(),:?@&=/~$%#]|i', function($m) { return rawurlencode($m[0]); }, $u['user'] . ($u['pass'] ? ":" . $u['pass'] : "") . "@") : "") . ($u['host'] ? $u['host'] : "") . ($u['port'] ? ":" . intval($u['port']) : ""); @@ -543,7 +543,7 @@ static function U(/* ... */) $parts[$i] = (preg_match('/[0-9a-f][0-9a-f]/i', $parts[$i]) ? "%" : "%25") . $parts[$i]; $path = join("", $parts); - $path = preg_replace_callback('|[^-a-z0-9_.+!*(),:?@&=/~$%#]|i', function($m) { return urlencode($m[0]); }, $path); + $path = preg_replace_callback('|[^-a-z0-9_.+!*(),:?@&=/~$%#]|i', function($m) { return rawurlencode($m[0]); }, $path); $path = preg_replace('|^([a-z0-9_]+:)?//[^/]*$|', '$0/', $path); # Add slash if absolute url without a path, e.g. http://gna.ch $queryparams = it_url::params($params); $separator = strpos($path, "?") === false ? "?" : "&"; |