aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng/parseSpec.js
AgeCommit message (Collapse)Author
2013-07-03fix($parse): disallow access to Function constructorChirayu Krishnappa
Enhances sandboxing of Angular Expressions to prevent attacks via: {}.toString.constructor(alert("evil JS code"))
2013-06-17chore(minErr): replace ngError with minErrKen Sheedlo
2013-05-24feat(ngError): add error message compression and better error messagesIgor Minar
- add toThrowNg matcher
2013-05-17test($parse): improve clarity of ternary testsZach Snow
2013-05-16feat($parse): add support for ternary operators to parserZach Snow
Add '?' token to lexer, add ternary rule to parser at (hopefully) proper precedence and associativity (based on https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/Operator_Precedence). Since (exp1 && exp2 || exp3) is supported by the parser, and (exp1 ? exp2 : exp3) works the same way, it seems reasonable to add this minor form of control to templates (see #719).
2013-04-29test(parse): Test for the parsing not invoking twice to get selfLucas Galfasó
New tests to not call twice a function to get self
2013-02-14feat($parse): added `constant` and `literal` propertiesDaniel Luz
* `literal` is set to true if the expression's top-level is a JavaScript literal (number, string, boolean, null/undefined, array, object), even if it contains non-literals inside. * `constant` is set to true if the expression is known to be made entirely of constant values, i.e., evaluating it will always yield the same result. A consequence is that a JSON expression is guaranteed to be both literal and constant.
2013-01-17feat($parse): allow strict equality in angular expressionsJeremy Tymes
Allows the parser to parse strict equality and inequality in angular expressions. Closes #908
2012-05-05fix($parse): support methods on falsy primitive typesVojta Jina
e.g. zero, false, empty string - fix tests to be executed with csp true - fix cps (when more than 5 parts)
2012-04-27feat($parse): CSP compatibilityIgor Minar
CSP (content security policy) forbids apps to use eval or Function(string) generated functions (among other things). For us to be compatible, we just need to implement the "getterFn" in $parse without violating any of these restrictions. We currently use Function(string) generated functions as a speed optimization. With this change, it will be possible to opt into the CSP compatible mode using the ngCsp directive. When this mode is on Angular will evaluate all expressions up to 30% slower than in non-CSP mode, but no security violations will be raised. In order to use this feature put ngCsp directive on the root element of the application. For example: <!doctype html> <html ng-app ng-csp> ... ... </html> Closes #893
2012-03-28chore(module): move files around in preparation for more modulesMisko Hevery