summaryrefslogtreecommitdiffstats
path: root/spec/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/utils.js')
-rw-r--r--spec/utils.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/utils.js b/spec/utils.js
index 0216c8d..4582e24 100644
--- a/spec/utils.js
+++ b/spec/utils.js
@@ -25,6 +25,12 @@ describe('utils', function() {
var string = new Handlebars.SafeString('foo<&"\'>');
equals(Handlebars.Utils.escapeExpression(string), 'foo<&"\'>');
+ var obj = {
+ toHTML: function() {
+ return 'foo<&"\'>';
+ }
+ };
+ equals(Handlebars.Utils.escapeExpression(obj), 'foo<&"\'>');
});
it('should handle falsy', function() {
equals(Handlebars.Utils.escapeExpression(''), '');