From 2ce3218f57060f33088ac146a3ed662b240ccc39 Mon Sep 17 00:00:00 2001 From: cash Date: Tue, 9 Nov 2010 11:34:23 +0000 Subject: Refs #2609 - added fix to trunk git-svn-id: http://code.elgg.org/elgg/trunk@7278 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/groups/actions/edit.php | 16 ++++++++++++++-- 1 file 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]); } -- cgit v1.2.3