• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/location/admin/helper.php
  • Класс: BitrixSaleLocationAdminHelper
  • Вызов: Helper::makeSafeDisplay
static function makeSafeDisplay(&$value, $code)
{
	$columns = static::getColumns('');

	$value = (string)$value;
	if(!empty($columns[$code]))
	{
		if ($value === '' && isset($columns[$code]['default']))
		{
			$value = (string)$columns[$code]['default'];
		}

		switch($columns[$code]['data_type'])
		{
			case 'integer':
				$value = (int)$value;
				break;
			case 'float':
				$value = (float)$value;
				break;
			default:
				$value = htmlspecialcharsbx($value);
		}
	}
	else
		$value = htmlspecialcharsbx($value);

	return $value;
}