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), "'; + return ''; } diff --git a/js/main.js b/js/main.js index d7381c96a4..25029c1b05 100644 --- a/js/main.js +++ b/js/main.js @@ -1,3 +1,7 @@ + function resizeIframe(obj) { + obj.style.height = 0; + obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px'; + } function openClose(theID) { if(document.getElementById(theID).style.display == "block") {