use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
use Friendica\Util\ParseUrl;
use Friendica\Util\Proxy as ProxyUtils;
use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
use Friendica\Util\ParseUrl;
use Friendica\Util\Proxy as ProxyUtils;
$oembed_record = DBA::selectFirst('oembed', ['content'], $condition);
if (DBA::isResult($oembed_record)) {
$json_string = $oembed_record['content'];
$oembed_record = DBA::selectFirst('oembed', ['content'], $condition);
if (DBA::isResult($oembed_record)) {
$json_string = $oembed_record['content'];
'maxwidth' => $a->videowidth,
'content' => $json_string,
'created' => DateTimeFormat::utcNow()
'maxwidth' => $a->videowidth,
'content' => $json_string,
'created' => DateTimeFormat::utcNow()
- $tpl = get_markup_template('oembed_video.tpl');
- $ret .= replace_macros($tpl, [
+ $tpl = Renderer::getMarkupTemplate('oembed_video.tpl');
+ $ret .= Renderer::replaceMacros($tpl, [
'$baseurl' => System::baseUrl(),
'$embedurl' => $oembed->embed_url,
'$escapedhtml' => base64_encode($oembed->html),
'$baseurl' => System::baseUrl(),
'$embedurl' => $oembed->embed_url,
'$escapedhtml' => base64_encode($oembed->html),
- $ret = str_replace("\n", "", $ret);
- return mb_convert_encoding($ret, 'HTML-ENTITIES', mb_detect_encoding($ret));
+ return str_replace("\n", "", $ret);