diff --git a/.jshintrc b/.jshintrc index 8aa7d8a0..d7798813 100644 --- a/.jshintrc +++ b/.jshintrc @@ -25,6 +25,7 @@ "HeaderView": false, "MainView": false, "Docs": false, - "SwaggerClient": false + "SwaggerClient": false, + "Handlebars": false } } \ No newline at end of file diff --git a/src/main/coffeescript/helpers/handlebars.coffee b/src/main/coffeescript/helpers/handlebars.coffee deleted file mode 100644 index 5f45bf28..00000000 --- a/src/main/coffeescript/helpers/handlebars.coffee +++ /dev/null @@ -1,5 +0,0 @@ -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) -) \ No newline at end of file diff --git a/src/main/coffeescript/helpers/handlebars.js b/src/main/coffeescript/helpers/handlebars.js new file mode 100644 index 00000000..58a43d70 --- /dev/null +++ b/src/main/coffeescript/helpers/handlebars.js @@ -0,0 +1,7 @@ +'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); +}); \ No newline at end of file