]> git.mxchange.org Git - friendica.git/commitdiff
fine tuning diaspora markdown to bbcode
authorfriendica <info@friendica.com>
Thu, 12 Jan 2012 06:49:17 +0000 (22:49 -0800)
committerfriendica <info@friendica.com>
Thu, 12 Jan 2012 06:49:17 +0000 (22:49 -0800)
include/bb2diaspora.php

index 8564d20e3580303d33c7e0cc9290930d27f06885..8f17f2e36fb595df062b761742ef0076e8cbf32c 100644 (file)
@@ -22,7 +22,7 @@ function diaspora2bb($s) {
 
        // we seem to get a lot of text smushed together with links from Diaspora.
        // if it's a url that we haven't already parsed into a bbcode structure, put a space before it.
-       $s = preg_replace("/([^=])(https?:\/\/)/ism",'$1 $2',$s);
+       $s = preg_replace("/([^=\"\]])(https?:\/\/)/ism",'$1 $2',$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);