You are here

function _exif_handle_field_value_consistency in Exif 7

3 calls to _exif_handle_field_value_consistency()
_exif_handle_date_field in ./exif.module
handle date field.
_exif_handle_taxonomy_field in ./exif.module
handle taxonomy field.
_exif_handle_text_field in ./exif.module
handle text field.

File

./exif.module, line 271

Code

function _exif_handle_field_value_consistency($exif_value, $field) {
  if (!drupal_validate_utf8($exif_value)) {
    $exif_value = check_plain(utf8_encode($exif_value));
  }
  if (!empty($field['settings']['max_length'])) {
    $exif_value = truncate_utf8($exif_value, $field['settings']['max_length'], TRUE, TRUE);
  }
  return $exif_value;
}