diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2004-06-27 22:09:12 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2004-06-27 22:09:12 +0000 |
commit | 72155f8bbf1b7473ef4bb2797c7bad67c01826ec (patch) | |
tree | c28a0fd42f92400039ca7796d57bbe69ce866510 | |
parent | 7ebcac265a6cdf71256645da6f97715a54604a80 (diff) | |
download | brdo-72155f8bbf1b7473ef4bb2797c7bad67c01826ec.tar.gz brdo-72155f8bbf1b7473ef4bb2797c7bad67c01826ec.tar.bz2 |
Using drupal_specialchars() instead of htmlentities(). htmlentities() is not UTF-8 safe.
-rw-r--r-- | modules/profile.module | 6 | ||||
-rw-r--r-- | modules/profile/profile.module | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/profile.module b/modules/profile.module index 0a2bc98b3..ac7bba039 100644 --- a/modules/profile.module +++ b/modules/profile.module @@ -131,7 +131,7 @@ function profile_view_field($user, $field) { case 'textarea': return check_output($value); case 'selection': - return l($value, "profile/$field->name/". htmlentities($value)); + return l($value, "profile/$field->name/". drupal_specialchars($value)); case 'checkbox': return l($field->title, "profile/$field->name"); case 'url': @@ -141,7 +141,7 @@ function profile_view_field($user, $field) { $fields = array(); foreach ($values as $value) { if ($value = trim(strip_tags($value))) { - $fields[] = l($value, "profile/$field->name/". htmlentities($value)); + $fields[] = l($value, "profile/$field->name/". drupal_specialchars($value)); } } return implode(', ', $fields); @@ -244,7 +244,7 @@ function profile_validate_profile($edit, $category) { function profile_categories() { $result = db_query("SELECT DISTINCT(category) FROM {profile_fields}"); while ($category = db_fetch_object($result)) { - $data[] = array('name' => htmlentities(strtolower($category->category)), 'title' => strtolower($category->category), 'weight' => 3); + $data[] = array('name' => drupal_specialchars(strtolower($category->category)), 'title' => strtolower($category->category), 'weight' => 3); } return $data; } diff --git a/modules/profile/profile.module b/modules/profile/profile.module index 0a2bc98b3..ac7bba039 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -131,7 +131,7 @@ function profile_view_field($user, $field) { case 'textarea': return check_output($value); case 'selection': - return l($value, "profile/$field->name/". htmlentities($value)); + return l($value, "profile/$field->name/". drupal_specialchars($value)); case 'checkbox': return l($field->title, "profile/$field->name"); case 'url': @@ -141,7 +141,7 @@ function profile_view_field($user, $field) { $fields = array(); foreach ($values as $value) { if ($value = trim(strip_tags($value))) { - $fields[] = l($value, "profile/$field->name/". htmlentities($value)); + $fields[] = l($value, "profile/$field->name/". drupal_specialchars($value)); } } return implode(', ', $fields); @@ -244,7 +244,7 @@ function profile_validate_profile($edit, $category) { function profile_categories() { $result = db_query("SELECT DISTINCT(category) FROM {profile_fields}"); while ($category = db_fetch_object($result)) { - $data[] = array('name' => htmlentities(strtolower($category->category)), 'title' => strtolower($category->category), 'weight' => 3); + $data[] = array('name' => drupal_specialchars(strtolower($category->category)), 'title' => strtolower($category->category), 'weight' => 3); } return $data; } |