summaryrefslogtreecommitdiff
path: root/it_html.class
diff options
context:
space:
mode:
authorUrban Müller2009-11-18 16:40:18 +0000
committerUrban Müller2009-11-18 16:40:18 +0000
commit4fb9b23b494e4d694bcf64d7a61ab26c7fa1cbfd (patch)
treea203a5fd0dbb7f6cc9b98d7a76cb040564c50289 /it_html.class
parentcff801de3dc850209199c15a24f82049b29653b9 (diff)
downloaditools-4fb9b23b494e4d694bcf64d7a61ab26c7fa1cbfd.tar.gz
itools-4fb9b23b494e4d694bcf64d7a61ab26c7fa1cbfd.tar.bz2
itools-4fb9b23b494e4d694bcf64d7a61ab26c7fa1cbfd.zip
pass fragments
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 8f2370f..5935730 100644
--- a/it_html.class
+++ b/it_html.class
@@ -455,7 +455,7 @@ function u(/* ... */)
$schemepart = $hostpart ? ($u['scheme'] ? $u['scheme'] . ":" : "") . "//$hostpart" : "";
- $path = $u['path'] . ($u['query'] ? "?" . $u['query'] : "") . ($u['anchor'] ? "#" . $u['anchor'] : "");
+ $path = $u['path'] . ($u['query'] ? "?" . $u['query'] : "") . ($u['fragment'] ? "#" . $u['fragment'] : "");
# hack: encode % if not followed by two hex digits
$parts = preg_split('/%([^%]{0,2})/', $path, -1, PREG_SPLIT_DELIM_CAPTURE);
@@ -463,7 +463,7 @@ function u(/* ... */)
$parts[$i] = (preg_match('/[0-9a-f][0-9a-f]/i', $parts[$i]) ? "%" : "%25") . $parts[$i];
$path = join("", $parts);
- $path = preg_replace('|[^-\w.+!*(),:?@&=/~$%]|e', 'urlencode(stripslashes("$0"))', $path); # Single quotes are escaped with slash by preg_replace, remove it for urlencode
+ $path = preg_replace('|[^-\w.+!*(),:?@&=/~$%#]|e', 'urlencode(stripslashes("$0"))', $path); # Single quotes are escaped with slash by preg_replace, remove it for urlencode
$path = preg_replace('|^(\w+:)?//[^/]*$|', '$0/', $path); # Add slash if absolute url without a path, e.g. http://gna.ch
$queryparams = it_url::params($params);
$separator = strpos($path, "?") === false ? "?" : "&";