diff options
Diffstat (limited to 'mod/htmlawed/start.php')
-rw-r--r-- | mod/htmlawed/start.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/mod/htmlawed/start.php b/mod/htmlawed/start.php index 1fab03153..419034f5a 100644 --- a/mod/htmlawed/start.php +++ b/mod/htmlawed/start.php @@ -107,16 +107,23 @@ function htmlawed_filter_tags($hook, $entity_type, $returnvalue, $params) { $return = ""; $return = htmLawed($var, $htmlawed_config); } else { - $return = array(); + + array_walk_recursive($var, 'htmLawedArray', $htmlawed_config); - foreach($var as $key => $el) { - $return[$key] = htmLawed($el, $htmlawed_config); - } + $return = $var; } } return $return; } +/** + * wrapper function for htmlawed for handling arrays + */ +function htmLawedArray(&$v, $k, $htmlawed_config) { + $v = htmLawed($v, $htmlawed_config); +} + + register_elgg_event_handler('init', 'system', 'htmlawed_init'); |