diff --git a/src/ngRoute/route.js b/src/ngRoute/route.js index 0b1814f132c8..00726412fb98 100644 --- a/src/ngRoute/route.js +++ b/src/ngRoute/route.js @@ -468,9 +468,7 @@ function $RouteProvider(){ for (var i = 1, len = m.length; i < len; ++i) { var key = keys[i - 1]; - var val = 'string' == typeof m[i] - ? decodeURIComponent(m[i]) - : m[i]; + var val = m[i]; if (key && val) { params[key.name] = val; diff --git a/test/ngRoute/routeSpec.js b/test/ngRoute/routeSpec.js index 8584fb0c7909..072cf6bb8ab7 100644 --- a/test/ngRoute/routeSpec.js +++ b/test/ngRoute/routeSpec.js @@ -219,13 +219,13 @@ describe('$route', function() { expect($route.current).toBeUndefined(); })); - it('matches literal .', inject(function($route, $location, $rootScope) { + it('matches literal *', inject(function($route, $location, $rootScope) { $location.path('/$testX23/foo*(bar)/222'); $rootScope.$digest(); expect($route.current).toBeUndefined(); })); - it('matches literal *', inject(function($route, $location, $rootScope) { + it('matches literal .', inject(function($route, $location, $rootScope) { $location.path('/$test.23/foooo(bar)/222'); $rootScope.$digest(); expect($route.current).toBeUndefined(); @@ -238,7 +238,7 @@ describe('$route', function() { })); it('matches a URL with special chars', inject(function($route, $location, $rootScope) { - $location.path('/$test.23/foo*(bar)/222'); + $location.path('/$test.23/foo*(bar)/~!@#$%^&*()_+=-`'); $rootScope.$digest(); expect($route.current).toBeDefined(); }));