summaryrefslogtreecommitdiff
path: root/it_html.class
diff options
context:
space:
mode:
authorUrban Müller2013-10-14 11:58:37 +0000
committerUrban Müller2013-10-14 11:58:37 +0000
commitddc2093a9a59eba375a8ad3433467e91a12d8bd5 (patch)
treefce053c0cd4130d81189fc61cc0089025684f65c /it_html.class
parentfab282eb800ef5626f85f3c876e797b4fc472e0d (diff)
downloaditools-ddc2093a9a59eba375a8ad3433467e91a12d8bd5.tar.gz
itools-ddc2093a9a59eba375a8ad3433467e91a12d8bd5.tar.bz2
itools-ddc2093a9a59eba375a8ad3433467e91a12d8bd5.zip
use %20 instead of + for blanks in U(), werbeverlags ag needs it that way
Diffstat (limited to 'it_html.class')
-rw-r--r--it_html.class4
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 ? "?" : "&";