dang - you really have to bludgeon this thing to get youtube to use https
This commit is contained in:
parent
46f0de7120
commit
096cc726b7
@ -14,6 +14,10 @@ function oembed_fetch_url($embedurl){
|
|||||||
|
|
||||||
$txt = Cache::get($a->videowidth . $embedurl);
|
$txt = Cache::get($a->videowidth . $embedurl);
|
||||||
|
|
||||||
|
if(strstr($txt,'youtu')) {
|
||||||
|
$txt = str_replace('http:','https:',$txt);
|
||||||
|
}
|
||||||
|
|
||||||
// These media files should now be caught in bbcode.php
|
// These media files should now be caught in bbcode.php
|
||||||
// left here as a fallback in case this is called from another source
|
// left here as a fallback in case this is called from another source
|
||||||
|
|
||||||
@ -99,8 +103,13 @@ function oembed_format_object($j){
|
|||||||
|
|
||||||
$th=120; $tw = $th*$tr;
|
$th=120; $tw = $th*$tr;
|
||||||
$tpl=get_markup_template('oembed_video.tpl');
|
$tpl=get_markup_template('oembed_video.tpl');
|
||||||
if(strstr($embedurl,'youtu'))
|
if(strstr($embedurl,'youtu')) {
|
||||||
$embedurl = str_replace('http:','https:',$embedurl);
|
$embedurl = str_replace('http:','https:',$embedurl);
|
||||||
|
$j->thumbnail_url = str_replace('http:','https:', $j->thumbnail_url);
|
||||||
|
$jhtml = str_replace('http:','https:', $jhtml);
|
||||||
|
$j->html = str_replace('http:','https:', $j->html);
|
||||||
|
|
||||||
|
}
|
||||||
$ret.=replace_macros($tpl, array(
|
$ret.=replace_macros($tpl, array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => $a->get_baseurl(),
|
||||||
'$embedurl'=>$embedurl,
|
'$embedurl'=>$embedurl,
|
||||||
|
Reference in New Issue
Block a user