This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -422,7 +422,7 @@ var locationPrototype = {
422
422
}
423
423
424
424
var match = PATH_MATCH . exec ( url ) ;
425
- if ( match [ 1 ] || url === '' ) this . path ( ( this . $$html5 ? decodeURI : decodeURIComponent ) ( match [ 1 ] ) ) ;
425
+ if ( match [ 1 ] || url === '' ) this . path ( decodeURIComponent ( match [ 1 ] ) ) ;
426
426
if ( match [ 2 ] || match [ 1 ] || url === '' ) this . search ( match [ 3 ] || '' ) ;
427
427
this . hash ( match [ 5 ] || '' ) ;
428
428
Original file line number Diff line number Diff line change @@ -681,11 +681,11 @@ describe('$location', function() {
681
681
expect ( locationUrl . path ( ) ) . toEqual ( '/foo:bar' ) ;
682
682
} ) ;
683
683
684
- it ( 'url() should not decode non-component special characters in html5 mode' , function ( ) {
684
+ it ( 'url() should decode non-component special characters in html5 mode' , function ( ) {
685
685
var locationUrl = new LocationHtml5Url ( 'http://host.com' , 'http://host.com' ) ;
686
686
locationUrl . $$parse ( 'http://host.com' ) ;
687
687
locationUrl . url ( '/foo%3Abar' ) ;
688
- expect ( locationUrl . path ( ) ) . toEqual ( '/foo%3Abar ' ) ;
688
+ expect ( locationUrl . path ( ) ) . toEqual ( '/foo:bar ' ) ;
689
689
} ) ;
690
690
} ) ;
691
691
} ) ;
You can’t perform that action at this time.
0 commit comments