• Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/security/sanitizer.php
  • Класс: BitrixSenderSecuritySanitizer
  • Вызов: Sanitizer::cleanHtml
static function cleanHtml($html)
{
	if (!$html || !is_string($html))
	{
		return null;
	}

	$html = preg_replace('/<(script|iframe)(.*?)>(.*?)(<\/\1.*?>)/is', '', $html);
	if (Loader::includeModule('fileman'))
	{
		$html = FilemanBlockContentSliceConverter::sanitize($html);
	}

	return $html;
}