From 90581e73490ce6044a6a568d6730c3084f9bc748 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 8 Aug 2004 16:19:32 +0000 Subject: [PATCH] - 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. --- modules/profile.module | 4 ++-- modules/profile/profile.module | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/profile.module b/modules/profile.module index b61470b39c3..25e9db13873 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 b61470b39c3..25e9db13873 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);