'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); }); Handlebars.registerHelper('renderTextParam', function(param) { var result; var isArray = param.type.toLowerCase() === 'array' || param.allowMultiple; var defaultValue = isArray && Array.isArray(param.default) ? param.default.join('\n') : param.default; if (typeof defaultValue === 'undefined') { defaultValue = ''; } if(isArray) { result = ""; } else { result = ""; } return new Handlebars.SafeString(result); });