• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/textparser.php
  • Класс: CTextParser
  • Вызов: CTextParser::convert_tag
public function convert_tag($tag = [])
{
	$res = '';

	if (
		!is_array($tag)
		|| $tag[2] == ''
	)
	{
		return $res;
	}

	$tagText = self::cleanTag($tag[2]);

	if ($tagText == '')
	{
		return $tag[0];
	}

	$res = htmlentities($tagText, (ENT_COMPAT | ENT_HTML401), SITE_CHARSET);
	$res = '#' . $res . '';

	return $tag[1].$this->defended_tags($res);
}