Skip to content

Commit f058970

Browse files
committed
fix: escape property names in compat mode (#1736)
1 parent 77825f8 commit f058970

File tree

3 files changed

+40
-630
lines changed

3 files changed

+40
-630
lines changed

lib/handlebars/compiler/javascript-compiler.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ JavaScriptCompiler.prototype = {
1616
return this.internalNameLookup(parent, name);
1717
},
1818
depthedLookup: function(name) {
19-
return [this.aliasable('container.lookup'), '(depths, "', name, '")'];
19+
return [
20+
this.aliasable('container.lookup'),
21+
'(depths, ',
22+
JSON.stringify(name),
23+
')'
24+
];
2025
},
2126

2227
compilerInfo: function() {

0 commit comments

Comments
 (0)