X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Foembed.php;h=cb478cb8605d7054133a6e9ab371e2dbb9187d9b;hb=789e1f4275bb216183f93cc392bd6faebfe87fb9;hp=f79f66a483863f0db1b5c7567c3ea54aed4b9bb5;hpb=7fc501d6dcbda801052609b5033b1eb019de3437;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 "";