summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2013-02-16 13:55:25 -0600
committerkpdecker <kpdecker@gmail.com>2013-02-16 13:55:55 -0600
commit30623ce90372d53e1b856f4d8bf561750353d7ba (patch)
tree13982f2b471565164f2cdfff95e70db1bd66244d
parent75a4f0d9317709e00f5c84b6b9d8cc4241f26d84 (diff)
downloadhandlebars.js-30623ce90372d53e1b856f4d8bf561750353d7ba.zip
handlebars.js-30623ce90372d53e1b856f4d8bf561750353d7ba.tar.gz
handlebars.js-30623ce90372d53e1b856f4d8bf561750353d7ba.tar.bz2
Add explicit SafeString property test
-rw-r--r--spec/qunit_spec.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/qunit_spec.js b/spec/qunit_spec.js
index 5953bca..02bf124 100644
--- a/spec/qunit_spec.js
+++ b/spec/qunit_spec.js
@@ -629,6 +629,12 @@ test("constructing a safestring from a string and checking its type", function()
equal(safe, "testing 1, 2, 3", "SafeString is equivalent to its underlying string");
});
+test("it should not escape SafeString properties", function() {
+ var name = new Handlebars.SafeString("<em>Sean O&#x27;Malley</em>");
+
+ shouldCompileTo('{{name}}', [{ name: name }], "<em>Sean O&#x27;Malley</em>");
+});
+
suite("helperMissing");
test("if a context is not found, helperMissing is used", function() {