diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-05 16:08:42 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-05 16:08:42 +0000 |
commit | 36ef345eb6425106f061fb866d9fa66d051e16df (patch) | |
tree | 53fb2bd05f8b5e2010f9e3d1e93075ad7071ec1e /mod/profile/actions/edit.php | |
parent | 5571ca5b350fd1735f13af7ddfbb88afa6befb0c (diff) | |
download | elgg-36ef345eb6425106f061fb866d9fa66d051e16df.tar.gz elgg-36ef345eb6425106f061fb866d9fa66d051e16df.tar.bz2 |
Merged 5530:5604 from 1.7 to trunk.
git-svn-id: http://code.elgg.org/elgg/trunk@5622 36083f99-b078-4883-b0ff-0f9b5a30f544
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']); |