aboutsummaryrefslogtreecommitdiff
path: root/mod/htmlawed
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-05 16:51:32 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-05 16:51:32 +0000
commit08d3f7f2820ed971ce5171c9ce9e15dbf452cf3f (patch)
tree75fd0261d5f92442fae934a58a9404bc3ed162f1 /mod/htmlawed
parent36ef345eb6425106f061fb866d9fa66d051e16df (diff)
downloadelgg-08d3f7f2820ed971ce5171c9ce9e15dbf452cf3f.tar.gz
elgg-08d3f7f2820ed971ce5171c9ce9e15dbf452cf3f.tar.bz2
Merged 5605:5622 from 1.7 to trunk.
git-svn-id: http://code.elgg.org/elgg/trunk@5623 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/htmlawed')
-rw-r--r--mod/htmlawed/start.php15
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');