diff options
| author | Vojta Jina | 2013-02-14 14:39:55 -0800 |
|---|---|---|
| committer | Vojta Jina | 2013-02-14 14:52:46 -0800 |
| commit | 288b69a314e9bd14458b6647532eb62aad5c5cdf (patch) | |
| tree | ab1b1e4eb441b5340780ff44589c3b8186510142 /test/ngResource/resourceSpec.js | |
| parent | 2a2123441c2b749b8f316a24c3ca3f77a9132a01 (diff) | |
| download | angular.js-288b69a314e9bd14458b6647532eb62aad5c5cdf.tar.bz2 | |
fix($http): do not encode special characters `@$:,` in params
encodeURIComponent is too aggressive and doesn't follow http://www.ietf.org/rfc/rfc3986.txt
with regards to the character set (pchar) allowed in path segments so we need
this test to make sure that we don't over-encode the params and break stuff
like buzz api which uses @self.
This is has already been fixed in `$resource`. This commit fixes it in a same way
for `$http` as well.
BREAKING CHANGE: $http does follow RFC3986 and does not encode special characters
like `$@,:` in params. If your application needs to encode these characters, encode
them manually, before sending the request.
Diffstat (limited to 'test/ngResource/resourceSpec.js')
| -rw-r--r-- | test/ngResource/resourceSpec.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/test/ngResource/resourceSpec.js b/test/ngResource/resourceSpec.js index db6fd402..3f2df284 100644 --- a/test/ngResource/resourceSpec.js +++ b/test/ngResource/resourceSpec.js @@ -118,9 +118,7 @@ describe("resource", function() { }); - // In order to get this passed, we need to fix $http - another breaking change, - // so I'm gonna submit that as a separate CL. - xit('should not encode @ in url params', function() { + it('should not encode @ in url params', function() { //encodeURIComponent is too agressive and doesn't follow http://www.ietf.org/rfc/rfc3986.txt //with regards to the character set (pchar) allowed in path segments //so we need this test to make sure that we don't over-encode the params and break stuff like |
