From: Michael Vogel Date: Fri, 1 May 2015 08:42:43 +0000 (+0200) Subject: rich content in oembed now replaces the content in attachments X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=be96b1eaa4d9279b51fc19227f5f1b85223f4785;p=friendica.git rich content in oembed now replaces the content in attachments --- diff --git a/include/bbcode.php b/include/bbcode.php index ef791d9e7c..1eac012c3e 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -4,7 +4,7 @@ require_once('include/event.php'); function bb_attachment($Text, $plaintext = false, $tryoembed = true) { $Text = preg_replace_callback("/(.*?)\[attachment(.*?)\](.*?)\[\/attachment\]/ism", - function ($match) use ($plaintext){ + function ($match) use ($plaintext, $tryoembed){ $attributes = $match[2]; @@ -83,14 +83,18 @@ function bb_attachment($Text, $plaintext = false, $tryoembed = true) { else $oembed = $bookmark[0]; - if (($image != "") AND !strstr(strtolower($oembed), "
', $url, $image, $title); - elseif (($preview != "") AND !strstr(strtolower($oembed), "
', $url, $preview, $title); + if (strstr(strtolower($oembed), "