aboutsummaryrefslogtreecommitdiffstats
path: root/include/oembed.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/oembed.php')
-rwxr-xr-xinclude/oembed.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/oembed.php b/include/oembed.php
index ff52545ee..7c577b6c2 100755
--- a/include/oembed.php
+++ b/include/oembed.php
@@ -217,10 +217,16 @@ function oembed_format_object($j){
}
function oembed_iframe($src,$width,$height) {
- if(! $width || strstr($width,'%'))
+ $scroll = ' scrolling="no" ';
+ if(! $width || strstr($width,'%')) {
$width = '640';
- if(! $height || strstr($height,'%'))
+ $scroll = ' scrolling="auto" ';
+ }
+ if(! $height || strstr($height,'%')) {
$height = '300';
+ $scroll = ' scrolling="auto" ';
+ }
+
// try and leave some room for the description line.
$height = intval($height) + 80;
$width = intval($width) + 40;
@@ -229,7 +235,7 @@ function oembed_iframe($src,$width,$height) {
// Make sure any children are sandboxed within their own iframe.
- return '<iframe height="' . $height . '" width="' . $width . '" src="' . $s . '" frameborder="no" >'
+ return '<iframe ' . $scroll . 'height="' . $height . '" width="' . $width . '" src="' . $s . '" frameborder="no" >'
. t('Embedded content') . '</iframe>';
}