From 48f5bd492de7acb021b9065beb2586391efb3c9e Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 16 Feb 2012 23:14:36 -0800 Subject: naked link with no protocol being passed from Diaspora --- include/oembed.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') 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"); -- cgit v1.2.3