summaryrefslogtreecommitdiffstats
path: root/spec/qunit_spec.js
diff options
context:
space:
mode:
authorYehuda Katz <wycats@gmail.com>2012-09-14 20:48:40 -0700
committerYehuda Katz <wycats@gmail.com>2012-09-14 20:48:40 -0700
commit26b1438f202b632297402922fcdce22f9d4883b7 (patch)
tree4b9d9605e68e6882fd2548f46bda75d367f8bf9f /spec/qunit_spec.js
parentb83e5e0ea619475e9d2999a03601ef0c921d3723 (diff)
parentbd9a84a0b74958ac9ca3fab45c125a6211c378fa (diff)
downloadhandlebars.js-26b1438f202b632297402922fcdce22f9d4883b7.zip
handlebars.js-26b1438f202b632297402922fcdce22f9d4883b7.tar.gz
handlebars.js-26b1438f202b632297402922fcdce22f9d4883b7.tar.bz2
Merge pull request #198 from codekitchen/master
properly handle ampersands when HTML escaping
Diffstat (limited to 'spec/qunit_spec.js')
-rw-r--r--spec/qunit_spec.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/qunit_spec.js b/spec/qunit_spec.js
index 8906a7b..f823863 100644
--- a/spec/qunit_spec.js
+++ b/spec/qunit_spec.js
@@ -123,6 +123,8 @@ test("escaping expressions", function() {
shouldCompileTo("{{awesome}}", {awesome: "&\"'`\\<>"}, '&amp;&quot;&#x27;&#x60;\\&lt;&gt;',
"by default expressions should be escaped");
+ shouldCompileTo("{{awesome}}", {awesome: "Escaped, <b> looks like: &lt;b&gt;"}, 'Escaped, &lt;b&gt; looks like: &amp;lt;b&amp;gt;',
+ "escaping should properly handle amperstands");
});
test("functions returning safestrings shouldn't be escaped", function() {