aboutsummaryrefslogtreecommitdiffstats
path: root/include/oembed.php
diff options
context:
space:
mode:
authorPaolo T <tuscanhobbit@users.noreply.github.com>2014-03-15 19:14:10 +0100
committerPaolo T <tuscanhobbit@users.noreply.github.com>2014-03-15 19:14:10 +0100
commit9b64c6163cba7530ee09e47b44e62c3e8ecf69ef (patch)
treee84880e412390f44e67aff1497562e633deed136 /include/oembed.php
parent4fd0d1489825bd456e0cac77b47de156ff94c0cc (diff)
parent3cb179aff19d803b91261e410c50b36e4bae1246 (diff)
downloadvolse-hubzilla-9b64c6163cba7530ee09e47b44e62c3e8ecf69ef.tar.gz
volse-hubzilla-9b64c6163cba7530ee09e47b44e62c3e8ecf69ef.tar.bz2
volse-hubzilla-9b64c6163cba7530ee09e47b44e62c3e8ecf69ef.zip
Merge pull request #2 from friendica/master
merge from friendica/red
Diffstat (limited to 'include/oembed.php')
-rwxr-xr-xinclude/oembed.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/oembed.php b/include/oembed.php
index d8671a752..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,6 +103,13 @@ function oembed_format_object($j){
$th=120; $tw = $th*$tr;
$tpl=get_markup_template('oembed_video.tpl');
+ 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,