aboutsummaryrefslogtreecommitdiffstats
path: root/include/oembed.php
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2011-11-11 17:33:32 +0100
committerFabio Comuni <fabrix.xm@gmail.com>2011-11-11 17:33:32 +0100
commit1ff8cddeb6b9eb53c2714893c61e378e8efc2768 (patch)
tree99d2b4bca1d7fc44994c4cf2ced813d7aaa8ceb3 /include/oembed.php
parent25b972bee2a708ab794cabf44f54163eb2edc787 (diff)
downloadvolse-hubzilla-1ff8cddeb6b9eb53c2714893c61e378e8efc2768.tar.gz
volse-hubzilla-1ff8cddeb6b9eb53c2714893c61e378e8efc2768.tar.bz2
volse-hubzilla-1ff8cddeb6b9eb53c2714893c61e378e8efc2768.zip
oembed: replace base64 url for iframe with url site/oembed/url_encoded
fix http://bugs.friendika.com/view.php?id=191
Diffstat (limited to 'include/oembed.php')
-rw-r--r--include/oembed.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/oembed.php b/include/oembed.php
index 3e86627e4..7c0da4594 100644
--- a/include/oembed.php
+++ b/include/oembed.php
@@ -56,7 +56,7 @@ function oembed_fetch_url($embedurl){
function oembed_format_object($j){
$embedurl = $j->embedurl;
- $jhtml = oembed_iframe($j->html,$j->width,$j->height );
+ $jhtml = oembed_iframe($j->embedurl,$j->width,$j->height );
$ret="<span class='oembed ".$j->type."'>";
switch ($j->type) {
case "video": {
@@ -116,7 +116,9 @@ function oembed_iframe($src,$width,$height) {
$height = intval($height) + 80;
$width = intval($width) + 40;
- $s = 'data:text/html;base64,' . base64_encode('<html><body>' . $src . '</body></html>');
+ $a = get_app();
+
+ $s = $a->get_baseurl()."/oembed/".base64url_encode($src);
return '<iframe height="' . $height . '" width="' . $width . '" src="' . $s . '" frameborder="no" >' . t('Embedded content') . '</iframe>';
}