urlencode the message-id component of generated /display/ links; in most cases this will be a no-op, unless the message-id is a url of some kind from a different provider.

This commit is contained in:
Hubzilla
2017-01-18 18:45:17 -08:00
parent d4e58e94f6
commit 7dfadfea4a
7 changed files with 11 additions and 16 deletions

View File

@@ -935,7 +935,7 @@ class Item extends \Zotlabs\Web\Controller {
'from_xchan' => $datarray['author_xchan'],
'to_xchan' => $datarray['owner_xchan'],
'item' => $datarray,
'link' => z_root() . '/display/' . $datarray['mid'],
'link' => z_root() . '/display/' . urlencode($datarray['mid']),
'verb' => ACTIVITY_POST,
'otype' => 'item',
'parent' => $parent,
@@ -953,7 +953,7 @@ class Item extends \Zotlabs\Web\Controller {
'from_xchan' => $datarray['author_xchan'],
'to_xchan' => $datarray['owner_xchan'],
'item' => $datarray,
'link' => z_root() . '/display/' . $datarray['mid'],
'link' => z_root() . '/display/' . urlencode($datarray['mid']),
'verb' => ACTIVITY_POST,
'otype' => 'item'
));
@@ -1005,7 +1005,7 @@ class Item extends \Zotlabs\Web\Controller {
}
$datarray['id'] = $post_id;
$datarray['llink'] = z_root() . '/display/' . $channel['channel_address'] . '/' . $post_id;
$datarray['llink'] = z_root() . '/display/' . urlencode($datarray['mid']);
call_hooks('post_local_end', $datarray);