• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/page/asset.php
  • Класс: BitrixMainPageAsset
  • Вызов: Asset::isValidScriptType
static function isValidScriptType($attrs)
{
	if ($attrs === "" || !preg_match("/type\s*=\s*(['"]?)(.*?)\1/i", $attrs, $match))
	{
		return true;
	}

	$type = mb_strtolower($match[2]);
	return $type === "" || $type === "text/javascript" || $type === "application/javascript";
}