AddEventHandler("main", "OnEndBufferContent", "ChangeMyContent");
function ChangeMyContent(&$content)
{
$content = sanitize_output($content);
}
function sanitize_output($buffer)
{
$buffer = str_replace('type="text/javascript"', '', $buffer);
return $buffer;
}
// Валидация js
AddEventHandler("main", "OnEndBufferContent", "delete_type");
function delete_type(&$content) {
$content = str_replace(" type=\"text/javascript\"", false, $content);
}