From ec67e0ab22c0d3f2851b0c420636e76b54af1b79 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Tue, 30 Oct 2018 15:38:19 +0100 Subject: Beautiful embedding for Hubzilla links --- include/oembed.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/oembed.php') diff --git a/include/oembed.php b/include/oembed.php index 41ab001d3..5a37defb8 100755 --- a/include/oembed.php +++ b/include/oembed.php @@ -272,6 +272,7 @@ function oembed_fetch_url($embedurl){ } $j['embedurl'] = $embedurl; + $j['zrl'] = $is_matrix; // logger('fetch return: ' . print_r($j,true)); @@ -335,7 +336,7 @@ function oembed_format_object($j){ case "rich": { // not so safe.. - $ret.= $jhtml; + (($j['zrl']) ? $ret = $j['html'] : $ret.= $jhtml); }; break; } -- cgit v1.2.3 From 339f95c647c82d113617115f38d1ea6ac91afc91 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Tue, 30 Oct 2018 16:49:48 +0100 Subject: Update oembed.php --- include/oembed.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/oembed.php') diff --git a/include/oembed.php b/include/oembed.php index 5a37defb8..e5557dc11 100755 --- a/include/oembed.php +++ b/include/oembed.php @@ -336,7 +336,11 @@ function oembed_format_object($j){ case "rich": { // not so safe.. - (($j['zrl']) ? $ret = $j['html'] : $ret.= $jhtml); + if($j['zrl']) { + $ret = ((preg_match('/^]+>(.*?)<\/div>$/is',$j['html'],$o)) ? $o[1] : $j['html']); + } else { + $ret.= $jhtml; + }; }; break; } -- cgit v1.2.3