Commit f835e23e authored by Damien McKenna's avatar Damien McKenna
Browse files

Merge tag '7.x-1.5' into 7.x-1.x

parents 21af7fc7 90a59d39
...@@ -366,19 +366,8 @@ function link_field_update($entity_type, $entity, $field, $instance, $langcode, ...@@ -366,19 +366,8 @@ function link_field_update($entity_type, $entity, $field, $instance, $langcode,
*/ */
function link_field_prepare_view($entity_type, $entities, $field, $instances, $langcode, &$items) { function link_field_prepare_view($entity_type, $entities, $field, $instances, $langcode, &$items) {
foreach ($items as $entity_id => $entity_items) { foreach ($items as $entity_id => $entity_items) {
$settings = $instances[$entity_id]['settings']; foreach ($entity_items as $delta => $value) {
$trimTitle = trim($settings['title_value']); _link_sanitize($items[$entity_id][$delta], $delta, $field, $instances[$entity_id], $entities[$entity_id]);
if (empty($entity_items) && !empty($trimTitle) && $settings['title'] == 'value' && $settings['url'] === 'optional') {
$token_value = token_replace($settings['title_value'], array($entity_type => $entities[$entity_id]));
$display_title = htmlspecialchars_decode($token_value, ENT_QUOTES);
$items[$entity_id][0]['url'] = NULL;
$items[$entity_id][0]['title'] = $display_title;
$items[$entity_id][0]['attributes'] = array();
}
else {
foreach ($entity_items as $delta => $value) {
_link_sanitize($items[$entity_id][$delta], $delta, $field, $instances[$entity_id], $entities[$entity_id]);
}
} }
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment