]> git.mxchange.org Git - friendica.git/commitdiff
Corrected the fix for images with links
authorMichael Vogel <icarus@dabo.de>
Sun, 15 Jul 2012 11:12:24 +0000 (13:12 +0200)
committerMichael Vogel <icarus@dabo.de>
Sun, 15 Jul 2012 11:12:24 +0000 (13:12 +0200)
include/bb2diaspora.php

index 25e4640b3aa034c3802b5720707c4b04418762c0..1a7d8eaffa45e7841a1e6dd39fe2ddecadd0d911 100644 (file)
@@ -202,7 +202,7 @@ function bb2diaspora($Text,$preserve_nl = false) {
        // 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\=([^\[\]]*)\]\[img\](.*?)\[\/img\]\[\/url\]/ism",
+       $Text = preg_replace("/\[url\=([^\[\]]*)\]\s*\[img\](.*?)\[\/img\]\s*\[\/url\]/ism",
                                "[img]$2[/img]\n[url]$1[/url]", $Text);
 
        // Convert it to HTML - don't try oembed