aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Item.php
diff options
context:
space:
mode:
authorHubzilla <hubzilla@hz.macgirvin.com>2017-01-19 15:37:30 -0800
committerHubzilla <hubzilla@hz.macgirvin.com>2017-01-19 15:37:30 -0800
commit96f196febda488e1db2d9a677fd5eb736aa76ae6 (patch)
tree8e97ca43e8f963b46effe4baee587ebd76892d6d /Zotlabs/Module/Item.php
parent5ce96b9b95c6b3497bfb49fd086a23a2dedb4e2e (diff)
downloadvolse-hubzilla-96f196febda488e1db2d9a677fd5eb736aa76ae6.tar.gz
volse-hubzilla-96f196febda488e1db2d9a677fd5eb736aa76ae6.tar.bz2
volse-hubzilla-96f196febda488e1db2d9a677fd5eb736aa76ae6.zip
add gen_link_id() function to selectively encode/decode the message-id component of /display/ links for message-ids that contain troublesome characters
Diffstat (limited to 'Zotlabs/Module/Item.php')
-rw-r--r--Zotlabs/Module/Item.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php
index d5fac306b..48992a676 100644
--- a/Zotlabs/Module/Item.php
+++ b/Zotlabs/Module/Item.php
@@ -724,6 +724,8 @@ class Item extends \Zotlabs\Web\Controller {
if(! $mid) {
$mid = (($message_id) ? $message_id : item_message_id());
}
+
+
if(! $parent_mid) {
$parent_mid = $mid;
}
@@ -935,7 +937,7 @@ class Item extends \Zotlabs\Web\Controller {
'from_xchan' => $datarray['author_xchan'],
'to_xchan' => $datarray['owner_xchan'],
'item' => $datarray,
- 'link' => z_root() . '/display/' . urlencode($datarray['mid']),
+ 'link' => z_root() . '/display/' . gen_link_id($datarray['mid']),
'verb' => ACTIVITY_POST,
'otype' => 'item',
'parent' => $parent,
@@ -953,7 +955,7 @@ class Item extends \Zotlabs\Web\Controller {
'from_xchan' => $datarray['author_xchan'],
'to_xchan' => $datarray['owner_xchan'],
'item' => $datarray,
- 'link' => z_root() . '/display/' . urlencode($datarray['mid']),
+ 'link' => z_root() . '/display/' . gen_link_id($datarray['mid']),
'verb' => ACTIVITY_POST,
'otype' => 'item'
));
@@ -1005,7 +1007,7 @@ class Item extends \Zotlabs\Web\Controller {
}
$datarray['id'] = $post_id;
- $datarray['llink'] = z_root() . '/display/' . urlencode($datarray['mid']);
+ $datarray['llink'] = z_root() . '/display/' . gen_link_id($datarray['mid']);
call_hooks('post_local_end', $datarray);