]> git.mxchange.org Git - friendica.git/commitdiff
fix images with links going to diaspora, the D* markdown processor changed and these...
authorfriendica <info@friendica.com>
Sun, 8 Jan 2012 08:57:36 +0000 (00:57 -0800)
committerfriendica <info@friendica.com>
Sun, 8 Jan 2012 08:57:36 +0000 (00:57 -0800)
include/bb2diaspora.php

index 0e001df3508a5682d4fafbb643fe0bb2b488d08f..cc188336b8e6f4d1aefe87fbf9b762d8c3a63a2f 100644 (file)
@@ -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