diff options
author | friendica <info@friendica.com> | 2014-02-28 01:30:05 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-02-28 01:30:05 -0800 |
commit | 096cc726b73bc9b41cb0353a3144f7992e787863 (patch) | |
tree | c379594c3a33eb4b20e6b5cc4a43d2e3e6de6bfd /include | |
parent | 46f0de7120d0773f361e08298c99ef804330adff (diff) | |
download | volse-hubzilla-096cc726b73bc9b41cb0353a3144f7992e787863.tar.gz volse-hubzilla-096cc726b73bc9b41cb0353a3144f7992e787863.tar.bz2 volse-hubzilla-096cc726b73bc9b41cb0353a3144f7992e787863.zip |
dang - you really have to bludgeon this thing to get youtube to use https
Diffstat (limited to 'include')
-rwxr-xr-x | include/oembed.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/oembed.php b/include/oembed.php index f9e9012d0..57631b051 100755 --- a/include/oembed.php +++ b/include/oembed.php @@ -14,6 +14,10 @@ function oembed_fetch_url($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 // 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; $tpl=get_markup_template('oembed_video.tpl'); - if(strstr($embedurl,'youtu')) + if(strstr($embedurl,'youtu')) { $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( '$baseurl' => $a->get_baseurl(), '$embedurl'=>$embedurl, |