aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)Author
2013-07-11fix(scope): watches can be safely unregistered inside watch handlersPaulo Scardine
Closes #2915
2013-07-11style(sanitize): fix typo in variable namesBen Holley
2013-07-11refactor(Angular.js): remove code duplicationEric Subach
Closes #2890
2013-07-11fix($injector): improve $injector:nomod error messageIgor Minar
Closes #2695
2013-07-11docs(ngList): fix example and add e2e testIgor Minar
2013-07-10style(input): remove wsIgor Minar
2013-07-10docs(ngMock): correct verifyNoOutstandingExpectation exampleMark Striemer
2013-07-09docs(angular.identity): fix missing 'angular' in identity functionMarco Vito Moscaritolo
2013-07-08feat($http): accept function as headers valuebolasblack
So we can request with dynamic header value. module.factory('Res', [ '$resource' '$routeParams' 'globalConfig' function($resource, $routeParams, globalConfig) { resource('/url/:id', {id: "@id"}, { patch: { method: 'patch', headers: { 'Authorization': function() { return "token " + globalConfig.token; } } } }); }]);
2013-07-08docs(ngModelController): provide a more intuitive examplePete Bacon Darwin
The example directive, using contenteditable was not showing required even if you cleared the content from it. Closes #3156
2013-07-08docs(numberFilter): fix explanation of default fraction sizePete Bacon Darwin
The default fraction size for the number filter is actually computed from the `NUMBER_FORMATS.PATTERNS.maxFrac` value in the current locale. Closes #3157
2013-07-08fix(angular.equals): do not match keys defined in the prototype chainDaniel Luz
Merely testing for object[key] will give incorrect results on keys defined in Object.prototype. Note: IE8 is generally broken in this regard since `for...in` never returns certain property keys even if they are defined directly on the object. See #2141 - partially merges this PR
2013-07-04docs(input): ng-model doesn't work well with isolated scope directivebasarat
Closes #3123
2013-07-03fix($compile): empty normalized href should pass sanitation checkAnders Hessellund Jensen
Sometimes IE returns an empty string for its normalized href on a tags. This should pass the sanitation check in $compile. Closes #2219, #2593
2013-07-03fix(i18n): Do not transform arrays into objectsLucas Galfasó
Do not trasnform arrays into objects when generating the locale objects Add unit test for this check
2013-07-03fix($sniffer): detect transition/animation on older Android browsersJulien Bouquillon
The stock Android browser doesn't support the current for-in body/style detection for animations and transitions but we can manually fix this. This is useful for PhoneGap web-views or traditional web-apps using the stock browser.
2013-07-03refactor(core): use native String.prototype.trim if availableSebastian Müller
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-07-02fix(jqLite): prepend array in correct orderJoao Sa
Match jQuery behavior when prepending array into empty element
2013-07-02fix(ngCloak): hide element even when CSS 'display' is setVineet Kumar
Previously an element like <div class="foo ng-cloak">...</div> would still be annoyingly visible if it matched a CSS rule like .foo { display: inline-block; }, overriding ng-cloak's display: none.
2013-07-02fix($compile): prevent infinite loop w/ replace+transclude directivesIgor Minar
Previously if a template contained a directive that had a template (sync or async) and the directive template was to replace the original element and the directive template contained another directive on the root element of this template and this new directive was an element transclude directive then an infinite recursion would follow because the compiler kept on re-adding and reapplying the original directive to the replaced node. This change fixes that. Closes #2155
2013-07-02revert: fix(compiler): corrects component transclusion on ...Igor Minar
This reverts commit 15e1a29cd08993b599f390e83a249ec17f753972. The original commit was fixing two issues - one of them was preventing attributes that triggered directives that replaced the compiled node to be merged into the new node. This change was a breaking change (as seen in the diff of the tests in this commit) and that's why it's being removed. A proper fix will follow.
2013-07-02fix($injector): refactor module loading code and use minErrIgor Minar
2013-07-01fix(jqLite): rename jqLiteError to jqLiteMinErrIgor Minar
2013-07-01fix(Angular.js): handle duplicate params in parseKeyValue/toKeyValuejoshkurz
parseKeyValue and toKeyValue can now handle duplicate values in the query. ``` ?x=1&x=2 <-> {x:[1,2]} ``` The algorithm looks like: 1)parseKeyValue looks for presence of obj[key] 2)detects and replaces obj[key] with [obj[key],val] 3)then pushes more duplicates if necessary 4)toKeyValue decodes array correctly 5)(not changed)$location.search({param: 'key'}) still replaces if necessary 6)(not changed)$location.search({param: ['key1', 'key2']}) sets the url with duplicates BREAKING CHANGE: Before this change: - `parseKeyValue` only took the last key overwriting all the previous keys; - `toKeyValue` joined the keys together in a comma delimited string. This was deemed buggy behavior. If your server relied on this behavior then either the server should be fixed or a simple serialization of the array should be done on the client before passing it to $location.
2013-07-01docs($cacheFactory): show that you can access existing cachesItamar Rogel
2013-07-01docs(Angular.js): explain that toJson strips $... propertiesSpencer Applegate
In Angular.toJson, any properties with a leading '$' character will be stripped from the resulting string since angular uses this notation internally for services. There have been complaints of not knowing about this functionality until it breaks within their code.
2013-06-27fix(compiler): corrects component transclusion on compilation root.Igor Minar
Closes# 2155
2013-06-27docs(ngBind): clarify some of the writingAndrew Peterson
2013-06-27docs(ngPluralize): improve wordingAndrew Peterson
2013-06-27docs(ngMock/$httpBackend): fix testing examplePete Bacon Darwin
Closes #3075
2013-06-24fix($location): default to / for the url base if no base[href]Igor Minar
With the recent refactoring of $location service we changed this behavior resulting in a regression. Previously we thought that html5 mode always required base[href] to be set in order for urls to resolve properly. It turns out that base[href] is problematic because it makes anchor urls (#foo) to always resolve to the base url, which is almost always incorrect and results in all anchors links and other anchor urls (e.g. svg references) to be broken. For this reason, we should now start recommending that people just deploy to root context (/) and not set the base[href] when using the html5 mode (push/pop history state). If it's impossible to deploy to the root context then either all urls in the app must be absolute or base[href] must be set with the caveat that anchor urls in such app won't work. Closes #2762
2013-06-24fix($parse): move global getter out of parse.jsChirayu Krishnappa
2013-06-24fix($compile): reject multi-expression interpolations for src attributeChirayu Krishnappa
BREAKING CHANGE: Concatenating expressions makes it hard to reason about whether some combination of concatenated values are unsafe to use and could easily lead to XSS. By requiring that a single expression be used for *[src/ng-src] such as iframe[src], object[src], etc. (but not img[src/ng-src] since that value is sanitized), we ensure that the value that's used is assigned or constructed by some JS code somewhere that is more testable or make it obvious that you bound the value to some user controlled value. This helps reduce the load when auditing for XSS issues. To migrate your code, follow the example below: Before: JS: scope.baseUrl = 'page'; scope.a = 1; scope.b = 2; HTML: <!-- Are a and b properly escaped here? Is baseUrl controlled by user? --> <iframe src="{{baseUrl}}?a={{a}&b={{b}}"> After: JS: var baseUrl = "page"; scope.getIframeSrc = function() { // There are obviously better ways to do this. The // key point is that one will think about this and do // it the right way. var qs = ["a", "b"].map(function(value, name) { return encodeURIComponent(name) + "=" + encodeURIComponent(value); }).join("&"); // baseUrl isn't on scope so it isn't bound to a user // controlled value. return baseUrl + "?" + qs; } HTML: <iframe src="{{getIframeSrc()}}">
2013-06-21fix($compile): disallow interpolations for DOM event handlersChirayu Krishnappa
BREAKING CHANGE: Interpolations inside DOM event handlers are disallowed. DOM event handlers execute arbitrary Javascript code. Using an interpolation for such handlers means that the interpolated value is a JS string that is evaluated. Storing or generating such strings is error prone and likely leads to an XSS if you're not super careful. On the other hand, ng-click and such event handlers evaluate Angular expressions that are a lot safer (e.g. No direct access to global objects - only scope), cleaner and harder to exploit. To migrate the code follow the example below: Before: JS: scope.foo = 'alert(1)'; HTML: <div onclick="{{foo}}"> After: JS: scope.foo = function() { alert(1); } HTML: <div ng-click="foo()">
2013-06-21fix($compile): sanitize values bound to img[src]Chirayu Krishnappa
Ref: 9532234bf1c408af9a6fd2c4743fdb585b920531 BREAKING CHANGE: img[src] URLs are now sanitized using the same whitelist as a[href] URLs. The most obvious impact is if you were using data: URIs. data: URIs will be whitelisted for img[src] in a future commit.
2013-06-20refactor(angular.bootstrap): rename internal functionPete Bacon Darwin
2013-06-20fix(Angular.js): don't crash on invalid query parametersPete Bacon Darwin
2013-06-20docs(ngRepeat): fix typoJens Rantil
2013-06-19fix($http): ensure case-insens. header overridingCaio Cunha
If user send content-type header, both content-type and default Content-Type headers were sent. Now default header overriding is case-insensitive.
2013-06-19feat(jqLite): switch bind/unbind to more recent jQuery on/offMichał Gołębiowski
jQuery switched to a completely new event binding implementation as of 1.7.0, centering around on/off methods instead of previous bind/unbind. This patch makes jqLite match this implementation while still supporting previous bind/unbind methods.
2013-06-18docs(loader): fix typo and minor semantic errorOre Landau
2013-06-17feat(ngdocs): support popover, foldouts and foldover annotationsMatias Niemelä
2013-06-17fix(ngMock): ensure mocked window still provides window.location functionalityMatias Niemelä
2013-06-17fix(jqLite): allow override of jqLite.triggerHandler event objectMatias Niemelä
2013-06-17chore(minErr): replace ngError with minErrKen Sheedlo
2013-06-13docs(select): fix typos in ngOptionsMisha Moroshko
2013-06-13docs($q): fix a few issuesOre Landau
2013-06-13style(ngRepeat): fix typosJulien Bouquillon
2013-06-12docs(FormController): add methods for FormControllerDean Sofer