From 350627988eb7813dac69450ff97f03a33e70d9f2 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 19 Dec 2016 14:35:13 -0800 Subject: zidify private mail --- Zotlabs/Module/Mail.php | 11 ++++++----- include/text.php | 1 - 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Zotlabs/Module/Mail.php b/Zotlabs/Module/Mail.php index 2a8407910..459ce5acf 100644 --- a/Zotlabs/Module/Mail.php +++ b/Zotlabs/Module/Mail.php @@ -47,8 +47,7 @@ class Mail extends \Zotlabs\Web\Controller { $body = trim(str_replace($match[1],'',$body)); } } - - echo json_encode(['preview' => smilies(bbcode($body))]); + echo json_encode(['preview' => zidify_links(smilies(bbcode($body)))]); killme(); } @@ -110,6 +109,8 @@ class Mail extends \Zotlabs\Web\Controller { require_once('include/text.php'); linkify_tags($a, $body, local_channel()); + // I don't think this is used any more. + if($preview) { $mail = [ 'mailbox' => 'outbox', @@ -118,8 +119,8 @@ class Mail extends \Zotlabs\Web\Controller { 'from_name' => $channel['xchan_name'], 'from_url' => $channel['xchan_url'], 'from_photo' => $channel['xchan_photo_s'], - 'subject' => smilies(bbcode($subject)), - 'body' => smilies(bbcode($body)), + 'subject' => zidify_links(smilies(bbcode($subject))), + 'body' => zidify_links(smilies(bbcode($body))), 'attachments' => '', 'can_recall' => false, 'is_recalled' => '', @@ -369,7 +370,7 @@ class Mail extends \Zotlabs\Web\Controller { 'to_url' => chanlink_hash($message['to_xchan']), 'to_photo' => $message['to']['xchan_photo_s'], 'subject' => $message['title'], - 'body' => smilies(bbcode($message['body'])), + 'body' => zidify_links(smilies(bbcode($message['body']))), 'attachments' => $s, 'delete' => t('Delete message'), 'dreport' => t('Delivery report'), diff --git a/include/text.php b/include/text.php index 593822bc7..d6151d8ef 100644 --- a/include/text.php +++ b/include/text.php @@ -3088,7 +3088,6 @@ function cleanup_bbcode($body) { $body = preg_replace_callback('/\[\$b64url(.*?)\[\/(url)\]/ism','\red_unescape_codeblock',$body); $body = preg_replace_callback('/\[\$b64code(.*?)\[\/(code)\]/ism','\red_unescape_codeblock',$body); - // fix any img tags that should be zmg $body = preg_replace_callback('/\[img(.*?)\](.*?)\[\/img\]/ism','\red_zrlify_img_callback',$body); -- cgit v1.2.3