aboutsummaryrefslogtreecommitdiffstats
path: root/include/channel.php
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-08-23 06:57:10 -0400
committerAndrew Manning <tamanning@zoho.com>2016-08-23 06:57:10 -0400
commit420aa4bc44a2fdf707b3964582258809f978ea2d (patch)
treec6def258a9311d513d6e1e89918c2ec0d17114f7 /include/channel.php
parent305e0538d293ff4ad72f30b11998ae3b06efa4ea (diff)
parent1e6a491400eaa01aeb2991d4b38e0255499d8b67 (diff)
downloadvolse-hubzilla-420aa4bc44a2fdf707b3964582258809f978ea2d.tar.gz
volse-hubzilla-420aa4bc44a2fdf707b3964582258809f978ea2d.tar.bz2
volse-hubzilla-420aa4bc44a2fdf707b3964582258809f978ea2d.zip
Merge remote-tracking branch 'upstream/dev' into website-export
Diffstat (limited to 'include/channel.php')
-rw-r--r--include/channel.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/channel.php b/include/channel.php
index 1179697a4..47db7e806 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -1381,6 +1381,11 @@ function zid($s,$address = '') {
if (! strlen($s) || strpos($s,'zid='))
return $s;
+ $m = parse_url($s);
+ $fragment = ((array_key_exists('fragment',$m) && $m['fragment']) ? $m['fragment'] : false);
+ if($fragment !== false)
+ $s = str_replace('#' . $fragment,'',$s);
+
$has_params = ((strpos($s,'?')) ? true : false);
$num_slashes = substr_count($s, '/');
if (! $has_params)
@@ -1401,6 +1406,11 @@ function zid($s,$address = '') {
else
$zurl = $s;
+ // put fragment at the end
+
+ if($fragment)
+ $zurl .= '#' . $fragment;
+
$arr = array('url' => $s, 'zid' => urlencode($myaddr), 'result' => $zurl);
call_hooks('zid', $arr);