Project

General

Profile

Revision 7d7b5830

Added by Assos Assos about 9 years ago

Weekly update of contrib modules

View differences:

drupal7/sites/all/modules/entity/modules/field.info.inc
51 51
    $property = &$info[$entity_type]['bundles'][$instance['bundle']]['properties'][$name];
52 52
    $instance += array('property info' => array());
53 53
    $property = $instance['property info'] + array(
54
      'label' => $instance['label'],
54
      // Since the label will be exposed via hook_token_info() and it is not
55
      // clearly defined if that should be sanitized already we prevent XSS
56
      // right here (field labels are user provided text).
57
      'label' => filter_xss_admin($instance['label']),
55 58
      'type' => $field_type['property_type'],
56 59
      'description' => t('Field "@name".', array('@name' => $name)),
57 60
      'getter callback' => 'entity_metadata_field_property_get',
......
164 167
  if (empty($instance['settings']['alt_field'])) {
165 168
    unset($property['property info']['alt']);
166 169
  }
167
  if (empty($field['settings']['title_field'])) {
170
  if (empty($instance['settings']['title_field'])) {
168 171
    unset($property['property info']['title']);
169 172
  }
170 173
}

Also available in: Unified diff