aboutsummaryrefslogtreecommitdiffstats
path: root/include/bb2diaspora.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-10-25 19:59:57 -0700
committerFriendika <info@friendika.com>2011-10-25 19:59:57 -0700
commit72d74b88be0e9a25920d336c7eab0aeb09342f63 (patch)
tree63df86c2a68f67eb56e1e15510731f435b5312ed /include/bb2diaspora.php
parent1aa1cd2cf5c5f7b7dd21bc3c67becfdfc7d41974 (diff)
downloadvolse-hubzilla-72d74b88be0e9a25920d336c7eab0aeb09342f63.tar.gz
volse-hubzilla-72d74b88be0e9a25920d336c7eab0aeb09342f63.tar.bz2
volse-hubzilla-72d74b88be0e9a25920d336c7eab0aeb09342f63.zip
some dspr fixes
Diffstat (limited to 'include/bb2diaspora.php')
-rw-r--r--include/bb2diaspora.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index e2711755b..f7398067b 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -11,8 +11,12 @@ function diaspora2bb($s) {
$s = preg_replace('/\@\{(.+?)\; (.+?)\@(.+?)\}/','@[url=https://$3/u/$2]$1[/url]',$s);
$s = Markdown($s);
$s = html2bbcode($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);
+ $s = preg_replace("/\[url\=https?:\/\/vimeo.com\/([0-9]+)\](.*?)\[\/url\]/ism",'[vimeo]$1[/vimeo]',$s);
+ $s = preg_replace("/([^\]\=]|^)(https?\:\/\/)(vimeo|youtu|www\.youtube|soundcloud)([a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1[url]$2$3$4[/url]',$s);
return $s;
}