diff options
author | friendica <info@friendica.com> | 2011-11-30 03:22:01 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2011-11-30 03:22:01 -0800 |
commit | 8f381e01aebbddfed9f56ba21e18837e570dee19 (patch) | |
tree | c53042e80dde76ee90f14d30d9e13fa3ef02f344 | |
parent | 73564df4d8e3dc42b9a1b179fb7c2ac8bc4b98b1 (diff) | |
download | volse-hubzilla-8f381e01aebbddfed9f56ba21e18837e570dee19.tar.gz volse-hubzilla-8f381e01aebbddfed9f56ba21e18837e570dee19.tar.bz2 volse-hubzilla-8f381e01aebbddfed9f56ba21e18837e570dee19.zip |
html_entity_decode D* incoming text
-rw-r--r-- | include/bb2diaspora.php | 4 | ||||
-rw-r--r-- | mod/message.php | 2 |
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>')), |