aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2018-10-31 09:36:09 +0100
committerMario <mario@mariovavti.com>2018-10-31 09:36:09 +0100
commitb468069875867d961abf7f105cc5fa3f247ac675 (patch)
tree610685d518fa90b752d606b672dfca66f617b2d6 /include
parentf9ab7647dd660adb37464614616cb8484c500de4 (diff)
parent339f95c647c82d113617115f38d1ea6ac91afc91 (diff)
downloadvolse-hubzilla-b468069875867d961abf7f105cc5fa3f247ac675.tar.gz
volse-hubzilla-b468069875867d961abf7f105cc5fa3f247ac675.tar.bz2
volse-hubzilla-b468069875867d961abf7f105cc5fa3f247ac675.zip
Merge branch 'patch-20' into 'dev'
Beautiful embedding for Hubzilla links See merge request hubzilla/core!1360
Diffstat (limited to 'include')
-rwxr-xr-xinclude/oembed.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/oembed.php b/include/oembed.php
index 41ab001d3..e5557dc11 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,11 @@ function oembed_format_object($j){
case "rich": {
// not so safe..
- $ret.= $jhtml;
+ if($j['zrl']) {
+ $ret = ((preg_match('/^<div[^>]+>(.*?)<\/div>$/is',$j['html'],$o)) ? $o[1] : $j['html']);
+ } else {
+ $ret.= $jhtml;
+ };
}; break;
}