Commit graph

2824 commits

Author SHA1 Message Date
Vojta Jina
976edc1fc4 chore: clean up angularFiles.js 2013-06-28 11:43:38 -07:00
Vojta Jina
29f96c852c chore: update karma to 0.9.4
And also add shared config to make karma configs a bit simpler.
2013-06-28 11:43:38 -07:00
Vojta Jina
89efb12ed8 chore: remove jstd leftovers 2013-06-28 11:43:38 -07:00
Igor Minar
b6b504b04c docs(misc/faq): remove obsolte t-shirt instructions 2013-06-28 11:27:32 -07:00
Igor Minar
e1ec5c7963 chore(build): change logging level for e2e tests to info 2013-06-28 09:33:08 -07:00
Pete Bacon Darwin
bd5c9a0371 style(ngRepeatSpec): fix up colons and iit 2013-06-28 08:28:06 +01:00
Igor Minar
15e1a29cd0 fix(compiler): corrects component transclusion on compilation root.
Closes# 2155
2013-06-27 21:30:24 -07:00
Igor Minar
344e195c60 chore(build): temporarily add more logging to debug flakiness on CI 2013-06-27 14:55:47 -07:00
Andrew Peterson
2adad3ab81 docs(ngBind): clarify some of the writing 2013-06-27 21:20:37 +01:00
Andrew Peterson
9d27b0af4c docs(ngPluralize): improve wording 2013-06-27 21:15:19 +01:00
Adam
bad9d1b71f docs(guide/e2e-testing): clarify description of input(name) selector
The description of the input selector made it seem that you were selecting
an input element based upon it's name attribute. In reality, you are
selecting an element by the string in the ng-model attribute.
2013-06-27 20:45:53 +01:00
Pete Bacon Darwin
fdab308278 docs(ngMock/$httpBackend): fix testing example
Closes #3075
2013-06-27 20:37:59 +01:00
Nelson Blaha
d57613cd6d docs(tutorial): add experiment showing reverse sort 2013-06-27 19:36:26 +01:00
Jeffrey Palmer
f810940600 docs(guide/controller): fix an error in the scope inheritance example
The chained scope creation example at the bottom of this document was using the childCtrl to create the babyScope, instead of the childScope.
2013-06-25 23:54:17 +01:00
Pete Bacon Darwin
73f8112032 fix(doc-gen): correctly transform index files
Closes #3021
2013-06-25 21:17:36 +01:00
Pete Bacon Darwin
71bc1b761d chore(doc_gen): add task to run doc-gen specs 2013-06-25 21:17:09 +01:00
Domenic Denicola
00d890c07a docs(guide/expression): remove reference to NullPointerException 2013-06-25 21:13:32 +01:00
Igor Minar
aef0980063 fix($location): default to / for the url base if no base[href]
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-24 22:32:55 -07:00
Chirayu Krishnappa
0960cd0613 test($compile): fix IE specific test. 2013-06-24 21:02:01 -07:00
Chirayu Krishnappa
cefdaf131d fix($parse): move global getter out of parse.js 2013-06-24 20:46:32 -07:00
Chirayu Krishnappa
38deedd6e3 fix($compile): reject multi-expression interpolations for src attribute
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-24 14:17:18 -07:00
Chirayu Krishnappa
39841f2ec9 fix($compile): disallow interpolations for DOM event handlers
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-21 17:37:44 -07:00
Chirayu Krishnappa
1adf29af13 fix($compile): sanitize values bound to img[src]
Ref: 9532234bf1

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-21 17:26:42 -07:00
Chirayu Krishnappa
99e85fc9b5 fix(docs): set ng-app for editing with plunker
Closes #3011
2013-06-21 12:28:34 -07:00
Pete Bacon Darwin
097947fd3b refactor(angular.bootstrap): rename internal function 2013-06-20 15:22:35 +01:00
NimaVaziri
3621896e9d docs(cookbook/helloworld): display "World" if no name is entered 2013-06-20 14:39:16 +01:00
Pete Bacon Darwin
8264d08085 fix(Angular.js): don't crash on invalid query parameters 2013-06-20 14:13:16 +01:00
Jens Rantil
a7908134cb docs(ngRepeat): fix typo 2013-06-20 11:07:13 +01:00
Caio Cunha
53359d549e fix($http): ensure case-insens. header overriding
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-19 21:30:59 +01:00
Michał Gołębiowski
f1b94b4b59 feat(jqLite): switch bind/unbind to more recent jQuery on/off
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-19 20:53:24 +01:00
sarkasm
0bfa29377d docs(directive): fix typo 2013-06-19 11:50:47 +01:00
gdi2290
db8d8f9a43 docs(tutorial): add missing 'node' command and <code> tags 2013-06-18 22:05:28 +01:00
John Bohn
8b81cf202b docs(tutorial/step_07): add commas make tutorial read more clearly 2013-06-18 21:56:53 +01:00
Ore Landau
6295a0d9bd docs(loader): fix typo and minor semantic error 2013-06-18 21:21:20 +01:00
Matias Niemelä
bf7ec4bbb1 chore(ngdocs): change minimum search length requirement 2013-06-18 09:40:13 -04:00
Matias Niemelä
f6be59c1b9 chore(ngdocs): provide test code for lunr search in docs 2013-06-18 09:37:29 -04:00
Matias Niemelä
46dfb92afd feat(ngdocs): provide support for user to jump between different versions of the angularjs documentation 2013-06-17 22:17:44 -07:00
Matias Niemelä
ef22968810 feat(ngdocs): support popover, foldouts and foldover annotations 2013-06-17 22:00:54 -07:00
Matias Niemelä
07ef1667db fix(ngMock): ensure mocked window still provides window.location functionality 2013-06-17 21:23:22 -07:00
Matias Niemelä
cec4ce28b9 chore(ngdocs): allow user to press escape key to close docs search 2013-06-17 21:23:22 -07:00
Matias Niemelä
0cac8729fb fix(jqLite): allow override of jqLite.triggerHandler event object 2013-06-17 21:23:22 -07:00
Matias Niemelä
6822709191 chore(ngdocs): update lunr to 0.4.0 2013-06-17 21:23:22 -07:00
Ken Sheedlo
003861d2fd chore(minErr): replace ngError with minErr 2013-06-17 13:29:30 -07:00
Igor Minar
908071afbf feat(Grunt): add source maps to all min files
Generate source map files when build step is ran and adds source map
headers to all min files.

Source map url must be appended to the min file otherwise the line
offsets will be off.

Inspired by Ryan Seddon (PR #2858)

Closes #1714
2013-06-14 21:51:25 -07:00
Ore Landau
cd3dd13425 docs(guide/di): fix headings hierarchy 2013-06-13 22:50:57 +01:00
Misha Moroshko
45ee8844f9 docs(select): fix typos in ngOptions 2013-06-13 22:47:47 +01:00
Ore Landau
9e2fd89021 docs($q): fix a few issues 2013-06-13 22:42:10 +01:00
Jad Naous
a2d4b5c5d8 docs(guide/e2e-testing): fix verb tense 2013-06-13 22:37:19 +01:00
Julien Bouquillon
14285568ca style(ngRepeat): fix typos 2013-06-13 21:17:52 +01:00
Ore Landau
5ec188f697 docs(tutorial/step_05): apply more useful link to services 2013-06-13 21:14:06 +01:00