aboutsummaryrefslogtreecommitdiffstats
path: root/include/oembed.php
diff options
context:
space:
mode:
authorHaakon Meland Eriksen <haakon.eriksen@far.no>2016-02-04 06:01:15 +0100
committerHaakon Meland Eriksen <haakon.eriksen@far.no>2016-02-04 06:01:15 +0100
commit8f810a3dcfd60c00b14d3da811e1c0cf005e8ced (patch)
tree07b801766018c60bd58a476bc60e85671bd70706 /include/oembed.php
parent36ac48779c85ae324d2d702714677e360af5930d (diff)
parent006efbd906980fca8c0c377fa2b0a4054c2849f4 (diff)
downloadvolse-hubzilla-8f810a3dcfd60c00b14d3da811e1c0cf005e8ced.tar.gz
volse-hubzilla-8f810a3dcfd60c00b14d3da811e1c0cf005e8ced.tar.bz2
volse-hubzilla-8f810a3dcfd60c00b14d3da811e1c0cf005e8ced.zip
Merge remote-tracking branch 'upstream/master'
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>';
}