From 36ef345eb6425106f061fb866d9fa66d051e16df Mon Sep 17 00:00:00 2001 From: brettp Date: Mon, 5 Apr 2010 16:08:42 +0000 Subject: Merged 5530:5604 from 1.7 to trunk. git-svn-id: http://code.elgg.org/elgg/trunk@5622 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/profile/actions/edit.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'mod/profile/actions') 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']); -- cgit v1.2.3