Skip to content

Commit

Permalink
fix: escape property names in compat mode (#1736)
Browse files Browse the repository at this point in the history
  • Loading branch information
nknapp committed Feb 13, 2021
1 parent 77825f8 commit f058970
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 630 deletions.
7 changes: 6 additions & 1 deletion lib/handlebars/compiler/javascript-compiler.js
Expand Up @@ -16,7 +16,12 @@ JavaScriptCompiler.prototype = {
return this.internalNameLookup(parent, name);
},
depthedLookup: function(name) {
return [this.aliasable('container.lookup'), '(depths, "', name, '")'];
return [
this.aliasable('container.lookup'),
'(depths, ',
JSON.stringify(name),
')'
];
},

compilerInfo: function() {
Expand Down

0 comments on commit f058970

Please sign in to comment.