diff options
Diffstat (limited to 'mod/profile/actions/edit.php')
-rw-r--r-- | mod/profile/actions/edit.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/mod/profile/actions/edit.php b/mod/profile/actions/edit.php index 4afe4cd47..207559334 100644 --- a/mod/profile/actions/edit.php +++ b/mod/profile/actions/edit.php @@ -33,10 +33,17 @@ foreach($CONFIG->profile as $shortname => $valuetype) { // the decoding is a stop gag to prevent && showing up in profile fields // because it is escaped on both input (get_input()) and output (view:output/text). see #561 and #1405. // must decode in utf8 or string corruption occurs. see #1567. - $value = html_entity_decode(get_input($shortname), ENT_COMPAT, 'UTF-8'); + $value = get_input($shortname); + if (is_array($value)) { + foreach ($value as $k => $v) { + $value[$k] = html_entity_decode($v, ENT_COMPAT, 'UTF-8'); + } + } else { + $value = html_entity_decode($value, ENT_COMPAT, 'UTF-8'); + } // limit to reasonable sizes. - if ($valuetype != 'longtext' && elgg_strlen($value) > 250) { + if (!is_array($value) && $valuetype != 'longtext' && elgg_strlen($value) > 250) { $error = sprintf(elgg_echo('profile:field_too_long'), elgg_echo("profile:{$shortname}")); register_error($error); forward($_SERVER['HTTP_REFERER']); |