summaryrefslogtreecommitdiff
path: root/it_html.class
diff options
context:
space:
mode:
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 ? "?" : "&";