X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Foembed.php;h=cb478cb8605d7054133a6e9ab371e2dbb9187d9b;hb=0c9cc29a51941eb572bf16fd5489d0947d47d033;hp=25995813a3316c26546eb3bc42b80c6485ae239c;hpb=58ba7c3969ce51d0f0f67d602886035230c1f3ae;p=friendica.git diff --git a/mod/oembed.php b/mod/oembed.php index 25995813a3..cb478cb860 100644 --- a/mod/oembed.php +++ b/mod/oembed.php @@ -2,11 +2,33 @@ require_once("include/oembed.php"); function oembed_content(&$a){ + // logger('mod_oembed ' . $a->query_string, LOGGER_ALL); + + if ($a->argv[1]=='b2h'){ + $url = array( "", trim(hex2bin($_REQUEST['url']))); + echo oembed_replacecb($url); + killme(); + } + + if ($a->argv[1]=='h2b'){ + $text = trim(hex2bin($_REQUEST['text'])); + echo oembed_html2bbcode($text); + killme(); + } + if ($a->argc == 2){ echo "
"; $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) == "