diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-04-26 09:05:47 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-04-26 09:05:47 +0200 |
commit | 09666ae8e9d7195c4b839abd9b10ae23ff783558 (patch) | |
tree | c8947d413ed3b5258fe8e25b905d2cac98c034e0 /include | |
parent | 953d02e4b7c8ae7e1ccbecb37751936cd23710e0 (diff) | |
parent | fe724acc3b78af5ed86b4bf0ff58bdd9b56356e2 (diff) | |
download | volse-hubzilla-09666ae8e9d7195c4b839abd9b10ae23ff783558.tar.gz volse-hubzilla-09666ae8e9d7195c4b839abd9b10ae23ff783558.tar.bz2 volse-hubzilla-09666ae8e9d7195c4b839abd9b10ae23ff783558.zip |
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'include')
-rwxr-xr-x | include/oembed.php | 6 | ||||
-rw-r--r-- | include/text.php | 15 |
2 files changed, 19 insertions, 2 deletions
diff --git a/include/oembed.php b/include/oembed.php index eee53b6c1..e677087a2 100755 --- a/include/oembed.php +++ b/include/oembed.php @@ -234,9 +234,11 @@ function oembed_fetch_url($embedurl){ if(preg_match('#\<iframe(.*?)src\=[\'\"](.*?)[\'\"]#',$j['html'],$matches)) { $x = z_fetch_url($matches[2]); - $j['html'] = $x['body']; + $orig = $j['html'] = $x['body']; } - + + logger('frame src: ' . $j['html'], LOGGER_DATA); + $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); diff --git a/include/text.php b/include/text.php index 60f6ff383..645c15df0 100644 --- a/include/text.php +++ b/include/text.php @@ -3402,3 +3402,18 @@ function unpunify($s) { } + +function unique_multidim_array($array, $key) { + $temp_array = array(); + $i = 0; + $key_array = array(); + + foreach($array as $val) { + if (!in_array($val[$key], $key_array)) { + $key_array[$i] = $val[$key]; + $temp_array[$i] = $val; + } + $i++; + } + return $temp_array; +}
\ No newline at end of file |