aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/bb2diaspora.php4
-rw-r--r--mod/message.php2
2 files changed, 4 insertions, 2 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index 036e6cdb8..eb709e01d 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -13,10 +13,12 @@ require_once('include/html2bbcode.php');
function diaspora2bb($s) {
+ $s = html_entity_decode($s,ENT_COMPAT,'UTF-8');
+
$s = preg_replace('/\@\{(.+?)\; (.+?)\@(.+?)\}/','@[url=https://$3/u/$2]$1[/url]',$s);
$s = Markdown($s);
$s = html2bbcode($s);
- $s = str_replace('*','*',$s);
+// $s = str_replace('*','*',$s);
$s = preg_replace("/\[url\=?(.*?)\]https?:\/\/www.youtube.com\/watch\?v\=(.*?)\[\/url\]/ism",'[youtube]$2[/youtube]',$s);
$s = preg_replace("/\[url\=https?:\/\/www.youtube.com\/watch\?v\=(.*?)\].*?\[\/url\]/ism",'[youtube]$1[/youtube]',$s);
$s = preg_replace("/\[url\=?(.*?)\]https?:\/\/vimeo.com\/([0-9]+)(.*?)\[\/url\]/ism",'[vimeo]$2[/vimeo]',$s);
diff --git a/mod/message.php b/mod/message.php
index 97868ab18..d48db8807 100644
--- a/mod/message.php
+++ b/mod/message.php
@@ -187,7 +187,7 @@ function message_content(&$a) {
$o .= replace_macros($tpl, array(
'$id' => $rr['id'],
'$from_name' =>$rr['from-name'],
- '$from_url' => $a->get_baseurl() . '/redir/' . $rr['contact-id'],
+ '$from_url' => (($rr['network'] === NETWORK_DFRN) ? $a->get_baseurl() . '/redir/' . $rr['contact-id'] : $rr['url'],
'$sparkle' => ' sparkle',
'$from_photo' => $rr['thumb'],
'$subject' => template_escape((($rr['mailseen']) ? $rr['title'] : '<strong>' . $rr['title'] . '</strong>')),