1
1
Fork 0

Corrected the fix for images with links

This commit is contained in:
Michael Vogel 2012-07-15 13:12:24 +02:00
parent 4e9086f9b0
commit 8aeb3ec2fb

View 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 // 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" // 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 // 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); "[img]$2[/img]\n[url]$1[/url]", $Text);
// Convert it to HTML - don't try oembed // Convert it to HTML - don't try oembed