'use strict'; Handlebars.registerHelper('sanitize', function(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); });