diff options
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 |