diff --git a/mod/oembed.php b/mod/oembed.php index f79f66a48..cb478cb86 100644 --- a/mod/oembed.php +++ b/mod/oembed.php @@ -21,6 +21,12 @@ function oembed_content(&$a){ $url = base64url_decode($a->argv[1]); $j = oembed_fetch_url($url); + // workaround for media.ccc.de (and any other endpoint that return size 0) + if (substr($j->html, 0, 7) == "html, 'width="0"')) { + $j->html = ''. $j->html; + $j->html = str_replace('width="0"', '', $j->html); + $j->html = str_replace('height="0"', '', $j->html); + } echo $j->html; // logger('mod-oembed ' . $j->html, LOGGER_ALL); echo "";