From: friendica Date: Thu, 12 Jan 2012 06:49:17 +0000 (-0800) Subject: fine tuning diaspora markdown to bbcode X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=aa1c28cf399f42b8b84f5a74bd9ab1a3ee34844c;p=friendica.git fine tuning diaspora markdown to bbcode --- diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index 8564d20e35..8f17f2e36f 100644 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -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);