diff options
author | zotlabs <mike@macgirvin.com> | 2017-07-09 16:02:45 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-07-09 16:04:45 -0700 |
commit | ddc454bd8260f39831f0d9cb86f797798ef73322 (patch) | |
tree | 7d67f1042eb718f5d5d8c9948c76660119dbf1f2 /include | |
parent | 799d4ad54932f387e0f852833b5ac3377c760b32 (diff) | |
download | volse-hubzilla-ddc454bd8260f39831f0d9cb86f797798ef73322.tar.gz volse-hubzilla-ddc454bd8260f39831f0d9cb86f797798ef73322.tar.bz2 volse-hubzilla-ddc454bd8260f39831f0d9cb86f797798ef73322.zip |
regression: allow position attributes in oembedable zcards by separating allow_position from the decision to allow zrls.
Should probably turn the entire zcard into a gd image as other consumers of zcards are also likely to purify the position attributes.
Diffstat (limited to 'include')
-rwxr-xr-x | include/oembed.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/oembed.php b/include/oembed.php index e35a77fa3..460e0244e 100755 --- a/include/oembed.php +++ b/include/oembed.php @@ -134,7 +134,9 @@ function oembed_fetch_url($embedurl){ $txt = null; // we should try to cache this and avoid a lookup on each render - $zrl = ((get_config('system','oembed_zrl')) ? is_matrix_url($embedurl) : false); + $is_matrix = is_matrix_url($embedurl); + + $zrl = ((get_config('system','oembed_zrl')) ? $is_matrix : false); $furl = ((local_channel() && $zrl) ? zid($embedurl) : $embedurl); @@ -222,7 +224,7 @@ function oembed_fetch_url($embedurl){ if($action === 'filter') { if($j['html']) { $orig = $j['html']; - $allow_position = (($zrl) ? true : false); + $allow_position = (($is_matrix) ? true : false); $j['html'] = purify_html($j['html'],$allow_position); if($j['html'] != $orig) { logger('oembed html was purified. original: ' . $orig . ' purified: ' . $j['html'], LOGGER_DEBUG, LOG_INFO); |