aboutsummaryrefslogtreecommitdiffstats
path: root/include/oembed.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-02-16 23:14:36 -0800
committerfriendica <info@friendica.com>2012-02-16 23:14:36 -0800
commit48f5bd492de7acb021b9065beb2586391efb3c9e (patch)
tree4d1bdb10135539fd7c306aa77e11983bc348b875 /include/oembed.php
parent2abbd81ce1760cdfd4098ae1d5cda29e608eb021 (diff)
downloadvolse-hubzilla-48f5bd492de7acb021b9065beb2586391efb3c9e.tar.gz
volse-hubzilla-48f5bd492de7acb021b9065beb2586391efb3c9e.tar.bz2
volse-hubzilla-48f5bd492de7acb021b9065beb2586391efb3c9e.zip
naked link with no protocol being passed from Diaspora
Diffstat (limited to 'include/oembed.php')
-rwxr-xr-xinclude/oembed.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/oembed.php b/include/oembed.php
index 118f7fa4a..af3413a25 100755
--- a/include/oembed.php
+++ b/include/oembed.php
@@ -12,6 +12,11 @@ function oembed_replacecb($matches){
function oembed_fetch_url($embedurl){
+ if(! strpos('://',$embedurl)) {
+ // this may be wrong but it's already wrong, we can only guess
+ $embedurl = 'http://' . $embedurl;
+ }
+
$txt = Cache::get($embedurl);
$noexts = array("mp3","mp4","ogg","ogv","oga","ogm","webm");