aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-01-09 18:52:49 -0800
committerfriendica <info@friendica.com>2012-01-09 18:52:49 -0800
commita13156c0f31bebd11569edcf587c678a89cd4175 (patch)
tree2c4239a925bbd2c38a69d1a9a5807b23027201ba /include
parent3bdcb5247105f41a1b436cd00727148cda2f90b9 (diff)
downloadvolse-hubzilla-a13156c0f31bebd11569edcf587c678a89cd4175.tar.gz
volse-hubzilla-a13156c0f31bebd11569edcf587c678a89cd4175.tar.bz2
volse-hubzilla-a13156c0f31bebd11569edcf587c678a89cd4175.zip
bypass D* markdown bug for now
Diffstat (limited to 'include')
-rw-r--r--include/bb2diaspora.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index 38f5c6735..e819976a7 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -94,8 +94,12 @@ function bb2diaspora($Text,$preserve_nl = false) {
// [img]pathtoimage[/img]
-// $Text = preg_replace("/\[url\=([$URLSearchString]*)\]\[img\](.*?)\[\/img\]\[\/url\]/ism",
-// '![' . t('image/photo') . '](' . '$2' . ')' . "\n" . '[' . t('link') . '](' . '$1' . ')', $Text);
+ // the following was added on 10-January-2012 due to an inability of Diaspora's
+ // new javascript markdown processor to handle links with images as the link "text"
+ // It is not optimal and may be removed if this ability is restored in the future
+
+ $Text = preg_replace("/\[url\=([$URLSearchString]*)\]\[img\](.*?)\[\/img\]\[\/url\]/ism",
+ '![' . t('image/photo') . '](' . '$2' . ')' . "\n" . '[' . t('link') . '](' . '$1' . ')', $Text);
$Text = preg_replace("/\[bookmark\]([$URLSearchString]*)\[\/bookmark\]/ism", '[$1]($1)', $Text);
$Text = preg_replace("/\[bookmark\=([$URLSearchString]*)\](.*?)\[\/bookmark\]/ism", '[$2]($1)', $Text);