• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/textparser.php
  • Класс: CTextParser
  • Вызов: CTextParser::convert_emoticon
public function convert_emoticon($code = '', $image = '', $description = '', $width = '', $height = '', $descriptionDecode = false, $imageDefinition = CSmile::IMAGE_SD)
{
	if ($code == '' || $image == '')
	{
		return '';
	}
	$code = stripslashes($code);
	$description = stripslashes($description);
	$image = stripslashes($image);
	$width = intval($width);
	$height = intval($height);
	if ($descriptionDecode)
	{
		$description = htmlspecialcharsback($description);
	}

	$html = '' . $code . '';
	$cacheKey = md5($html);
	if (!isset($this->preg['cache'][$cacheKey]))
	{
		$this->preg['cache'][$cacheKey] = $this->defended_tags($html);
	}

	return $this->preg['cache'][$cacheKey];
}