diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-08-08 16:19:32 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-08-08 16:19:32 +0000 |
commit | 90581e73490ce6044a6a568d6730c3084f9bc748 (patch) | |
tree | 346e8f981c945acd36d107105cb82eae337e64e4 | |
parent | daf175182e42c2d35fdb744550117eb374e81fc9 (diff) | |
download | brdo-90581e73490ce6044a6a568d6730c3084f9bc748.tar.gz brdo-90581e73490ce6044a6a568d6730c3084f9bc748.tar.bz2 |
- Patch #9866 by njivy: when the links are generated for each item in a list-type profile field, double quotes in the item name can break the link. To fix this, this patch gives drupal_specialchars() the ENT_QUOTES parameter to convert quotes into HTML entities. This fix is also applied to selection-type profile fields which can have the same problem.
-rw-r--r-- | modules/profile.module | 4 | ||||
-rw-r--r-- | modules/profile/profile.module | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/profile.module b/modules/profile.module index b61470b39..25e9db138 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/". drupal_specialchars($value)); + return l($value, "profile/$field->name/". drupal_specialchars($value, ENT_QUOTES)); 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/". drupal_specialchars($value)); + $fields[] = l($value, "profile/$field->name/". drupal_specialchars($value, ENT_QUOTES)); } } return implode(', ', $fields); diff --git a/modules/profile/profile.module b/modules/profile/profile.module index b61470b39..25e9db138 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/". drupal_specialchars($value)); + return l($value, "profile/$field->name/". drupal_specialchars($value, ENT_QUOTES)); 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/". drupal_specialchars($value)); + $fields[] = l($value, "profile/$field->name/". drupal_specialchars($value, ENT_QUOTES)); } } return implode(', ', $fields); |