X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Foembed.php;h=cb478cb8605d7054133a6e9ab371e2dbb9187d9b;hb=d6c1889a2039033b14a88cdb031461cadabf2114;hp=f79f66a483863f0db1b5c7567c3ea54aed4b9bb5;hpb=395be3dcde55d16c8e23dbe9137d1279b58442a4;p=friendica.git diff --git a/mod/oembed.php b/mod/oembed.php index f79f66a483..cb478cb860 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 "";