From 76ce4705e23f286cf6b568191840404e5cb94e9f Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 8 May 2024 14:34:44 +0000 Subject: more fixes for issue #1843 --- include/oembed.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'include/oembed.php') diff --git a/include/oembed.php b/include/oembed.php index 1b6157241..f52f73225 100644 --- a/include/oembed.php +++ b/include/oembed.php @@ -328,7 +328,7 @@ function oembed_format_object($j){ $jhtml = oembed_iframe($j['embedurl'],(isset($j['width']) ? $j['width'] : null), (isset($j['height']) ? $j['height'] : null)); - $ret=""; + $ret=""; switch ($j['type']) { case "video": { if (isset($j['thumbnail_url'])) { @@ -351,7 +351,6 @@ function oembed_format_object($j){ } else { $ret=$jhtml; } - $ret.="
"; }; break; case "photo": { $ret.= ""; @@ -386,15 +385,15 @@ function oembed_format_object($j){ // add link to source if not present in "rich" type if ( $j['type'] != 'rich' || !strpos($j['html'],$embedurl) ){ $embedlink = (isset($j['title']))?$j['title'] : $embedurl; - $ret .= '
' . "$embedlink"; + $ret .= "$embedlink"; $ret .= "
"; if (isset($j['author_name'])) $ret .= t(' by ') . $j['author_name']; if (isset($j['provider_name'])) $ret .= t(' on ') . $j['provider_name']; } else { // add for html2bbcode conversion - $ret .= "
$embedurl"; + $ret .= "$embedurl"; } - $ret.="
"; + $ret.="
"; // mb_convert_encoding() is deprecated // return mb_convert_encoding($ret, 'HTML-ENTITIES', mb_detect_encoding($ret)); @@ -414,8 +413,8 @@ function oembed_iframe($src,$width,$height) { } // try and leave some room for the description line. - $height = intval($height) + 80; - $width = intval($width) + 40; + $height = intval($height); + $width = intval($width); $s = z_root() . '/oembed/' . base64url_encode($src); -- cgit v1.2.3