]> git.mxchange.org Git - friendica.git/commitdiff
html_entity_decode D* incoming text
authorfriendica <info@friendica.com>
Wed, 30 Nov 2011 11:22:01 +0000 (03:22 -0800)
committerfriendica <info@friendica.com>
Wed, 30 Nov 2011 11:22:01 +0000 (03:22 -0800)
include/bb2diaspora.php
mod/message.php

index 036e6cdb84491f83c457b821658b1b19f3ab6c67..eb709e01dc834c242e597e468d4309f0133fe093 100644 (file)
@@ -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('&#42;','*',$s);
+//     $s = str_replace('&#42;','*',$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); 
index 97868ab187f386728afc4202a473f3f10c5cf1f2..d48db8807a76968d20365fb8adf6707416527289 100644 (file)
@@ -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>')),