_text_sanitize($instance, $langcode, $item, $column)Sanitizes the 'value' or 'summary' data of a text value.
Depending on whether the field instance uses text processing, data is run through check_plain() or check_markup().
$instance The instance definition.
$langcode The language associated to $item.
$item The field value to sanitize.
$column The column to sanitize (either 'value' or 'summary').
The sanitized string.
modules/field/modules/text/text.module, line 323
<?php
function _text_sanitize($instance, $langcode, $item, $column) {
// If the value uses a cacheable text format, text_field_load() precomputes
// the sanitized string.
if (isset($item["safe_$column"])) {
return $item["safe_$column"];
}
return $instance['settings']['text_processing'] ? check_markup($item[$column], $item['format'], $langcode, TRUE) : check_plain($item[$column]);
}
?>