aboutsummaryrefslogtreecommitdiffstats
path: root/include/bb2diaspora.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-01-08 00:57:36 -0800
committerfriendica <info@friendica.com>2012-01-08 00:57:36 -0800
commit977a49ad93c915ff89908e19017bf79bffedfa7c (patch)
tree3fd3249bc734c5cf384d7622a421475d2e60a000 /include/bb2diaspora.php
parent358b2a46f5b48e5b95b75ed87752a87dccde8d8e (diff)
downloadvolse-hubzilla-977a49ad93c915ff89908e19017bf79bffedfa7c.tar.gz
volse-hubzilla-977a49ad93c915ff89908e19017bf79bffedfa7c.tar.bz2
volse-hubzilla-977a49ad93c915ff89908e19017bf79bffedfa7c.zip
fix images with links going to diaspora, the D* markdown processor changed and these are no longer working.
Diffstat (limited to 'include/bb2diaspora.php')
-rw-r--r--include/bb2diaspora.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index 0e001df35..cc188336b 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