From be96b1eaa4d9279b51fc19227f5f1b85223f4785 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Fri, 1 May 2015 10:42:43 +0200 Subject: [PATCH] rich content in oembed now replaces the content in attachments --- include/bbcode.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) 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), "