diff options
-rw-r--r-- | mod/groups/actions/edit.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/mod/groups/actions/edit.php b/mod/groups/actions/edit.php index 4ae98815c..216a22702 100644 --- a/mod/groups/actions/edit.php +++ b/mod/groups/actions/edit.php @@ -8,12 +8,24 @@ // Load configuration global $CONFIG; +/** + * wrapper for recursive array walk decoding + */ +function profile_array_decoder(&$v) { + $v = html_entity_decode($v, ENT_COMPAT, 'UTF-8'); +} + // Get group fields $input = array(); foreach ($CONFIG->group as $shortname => $valuetype) { - $input[$shortname] = get_input($shortname); // another work around for Elgg's encoding problems: #561, #1963 - $input[$shortname] = html_entity_decode($input[$shortname], ENT_COMPAT, 'UTF-8'); + $input[$shortname] = get_input($shortname); + if (is_array($input[$shortname])) { + array_walk_recursive($input[$shortname], 'profile_array_decoder'); + } else { + $input[$shortname] = html_entity_decode($input[$shortname], ENT_COMPAT, 'UTF-8'); + } + if ($shortname == 'name') { $input[$shortname] = strip_tags($input[$shortname]); } |