summaryrefslogtreecommitdiffstats
path: root/spec/qunit_spec.js
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2013-05-28 17:03:07 -0400
committerkpdecker <kpdecker@gmail.com>2013-05-28 17:03:07 -0400
commit3ddbc5237f5208f40a7d438895fe2249bdf343b9 (patch)
tree492e9a4098f12b5b0a46035f40fa37abcabe8358 /spec/qunit_spec.js
parent503e32208bcc9e9f5d9052b4a7e732bf707be15e (diff)
downloadhandlebars.js-3ddbc5237f5208f40a7d438895fe2249bdf343b9.zip
handlebars.js-3ddbc5237f5208f40a7d438895fe2249bdf343b9.tar.gz
handlebars.js-3ddbc5237f5208f40a7d438895fe2249bdf343b9.tar.bz2
Protect from object prototype modifications
Fixes #534
Diffstat (limited to 'spec/qunit_spec.js')
-rw-r--r--spec/qunit_spec.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/qunit_spec.js b/spec/qunit_spec.js
index 23dcdb9..5f14db0 100644
--- a/spec/qunit_spec.js
+++ b/spec/qunit_spec.js
@@ -1530,6 +1530,14 @@ test('GH-375: Unicode line terminators', function() {
shouldCompileTo('\u2028', {}, '\u2028');
});
+test('GH-534: Object prototype aliases', function() {
+ Object.prototype[0xD834] = true;
+
+ shouldCompileTo('{{foo}}', { foo: 'bar' }, 'bar');
+
+ delete Object.prototype[0xD834];
+});
+
suite('Utils');
test('escapeExpression', function() {