aboutsummaryrefslogtreecommitdiffstats
path: root/include/oembed.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-02-02 17:14:07 -0800
committerredmatrix <git@macgirvin.com>2016-02-02 17:14:07 -0800
commit06dcaaa821d6229568709e53d104233081c4d3e9 (patch)
tree8388044eade0679a617a57ea990c8903edad2d3f /include/oembed.php
parent88669fa033d5b43d4cdad7b95c9af05bf9467d3b (diff)
downloadvolse-hubzilla-06dcaaa821d6229568709e53d104233081c4d3e9.tar.gz
volse-hubzilla-06dcaaa821d6229568709e53d104233081c4d3e9.tar.bz2
volse-hubzilla-06dcaaa821d6229568709e53d104233081c4d3e9.zip
some zcard cleanup - still eneds a lot more work
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>';
}