aboutsummaryrefslogtreecommitdiffstats
path: root/src/Scope.js
diff options
context:
space:
mode:
authorMisko Hevery2010-10-15 15:28:58 -0700
committerMisko Hevery2010-10-18 08:50:36 -0700
commit9e9bdbdc405b6afecd2e536e375c9d8fe40f110b (patch)
tree89bd9cdeb19782a6d449c931ae4688e5617a562e /src/Scope.js
parent352dbfa38fca660a80d6fae2c6e810f820247791 (diff)
downloadangular.js-9e9bdbdc405b6afecd2e536e375c9d8fe40f110b.tar.bz2
JSON parser is now strict (ie, expressions are not allowed for security)
Close #57
Diffstat (limited to 'src/Scope.js')
-rw-r--r--src/Scope.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Scope.js b/src/Scope.js
index c7de097b..0c6205a5 100644
--- a/src/Scope.js
+++ b/src/Scope.js
@@ -90,9 +90,9 @@ function expressionCompile(exp){
if (typeof exp === $function) return exp;
var fn = compileCache[exp];
if (!fn) {
- var parser = new Parser(exp);
- var fnSelf = parser.statements();
- parser.assertAllConsumed();
+ var p = parser(exp);
+ var fnSelf = p.statements();
+ p.assertAllConsumed();
fn = compileCache[exp] = extend(
function(){ return fnSelf(this);},
{fnSelf: fnSelf});