diff options
author | Urban Müller | 2009-11-18 16:40:18 +0000 |
---|---|---|
committer | Urban Müller | 2009-11-18 16:40:18 +0000 |
commit | 4fb9b23b494e4d694bcf64d7a61ab26c7fa1cbfd (patch) | |
tree | a203a5fd0dbb7f6cc9b98d7a76cb040564c50289 | |
parent | cff801de3dc850209199c15a24f82049b29653b9 (diff) | |
download | itools-4fb9b23b494e4d694bcf64d7a61ab26c7fa1cbfd.tar.gz itools-4fb9b23b494e4d694bcf64d7a61ab26c7fa1cbfd.tar.bz2 itools-4fb9b23b494e4d694bcf64d7a61ab26c7fa1cbfd.zip |
pass fragments
-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 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 ? "?" : "&"; |