From: friendica Date: Sun, 8 Jan 2012 08:57:36 +0000 (-0800) Subject: fix images with links going to diaspora, the D* markdown processor changed and these... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=977a49ad93c915ff89908e19017bf79bffedfa7c;p=friendica.git fix images with links going to diaspora, the D* markdown processor changed and these are no longer working. --- diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index 0e001df350..cc188336b8 100644 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -101,6 +101,9 @@ function bb2diaspora($Text,$preserve_nl = false) { $Text = preg_replace("/\#\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '[#$2]($1)', $Text); $Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '[$2]($1)', $Text); + $Text = preg_replace("/\[url\=([$URLSearchString]*)\]\[img\](.*?)\[\/img\]\[\/url\]/ism", + '![' . t('image/photo') . '](' . '$2' . ')' . "\n" . '[' . t('link') . '](' . '$1' . ')', $Text); + $Text = preg_replace("/\[img\](.*?)\[\/img\]/", '![' . t('image/photo') . '](' . '$1' . ')', $Text); // Perform MAIL Search