aboutsummaryrefslogtreecommitdiffstats
path: root/include/bb2diaspora.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/bb2diaspora.php')
-rw-r--r--include/bb2diaspora.php4
1 files changed, 3 insertions, 1 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);