From 72155f8bbf1b7473ef4bb2797c7bad67c01826ec Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Sun, 27 Jun 2004 22:09:12 +0000 Subject: Using drupal_specialchars() instead of htmlentities(). htmlentities() is not UTF-8 safe. --- modules/profile/profile.module | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/profile/profile.module') 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; } -- cgit v1.2.3