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

Lines changed: 6 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy