- 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.

4.5.x
Dries Buytaert 2004-08-08 16:19:32 +00:00
parent daf175182e
commit 90581e7349
2 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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);