- 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.
parent
daf175182e
commit
90581e7349
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue