fixes #1186 Render primitive types in "Response Class"

This commit is contained in:
Anna Bodnia
2016-02-03 19:37:38 +02:00
parent 0209d696fe
commit 39a171a61d
6 changed files with 47 additions and 12 deletions

View File

@@ -1,5 +1,4 @@
'use strict';
/*jslint eqeq: true*/
Handlebars.registerHelper('sanitize', function(html) {
// Strip the script tags from the html, and return it as a Handlebars.SafeString
@@ -53,6 +52,13 @@ Handlebars.registerHelper('renderTextParam', function(param) {
return new Handlebars.SafeString(result);
});
Handlebars.registerHelper('if_or', function(v1, v2, options) {
if (v1 || v2) {
return options.fn(this);
}
return options.inverse(this);
});
Handlebars.registerHelper('ifCond', function (v1, operator, v2, options) {
switch (operator) {