Handlebars.registerHelper('sanitize', (html) -> # Strip the script tags from the html, and return it as a Handlebars.SafeString html = html.replace(/)<[^<]*)*<\/script>/gi, '') return new Handlebars.SafeString(html) )