]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #2609 - added fix to trunk
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 9 Nov 2010 11:34:23 +0000 (11:34 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 9 Nov 2010 11:34:23 +0000 (11:34 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7278 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/groups/actions/edit.php

index 4ae98815c11982c5d28b7923cf7a84c7924e5fee..216a22702e523beac248597da465f3a866454fdf 100644 (file)
@@ -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]);
        }