fix($location): don't clobber path during parsing of path

Closes #7199
This commit is contained in:
Igor Minar
2014-04-24 13:48:45 -07:00
parent 76647d3855
commit 02058bfbe2
2 changed files with 12 additions and 5 deletions

View File

@@ -1539,6 +1539,16 @@ describe('$location', function() {
expect(location.url()).toBe('/not-starting-with-slash');
expect(location.absUrl()).toBe('http://server/pre/index.html#/not-starting-with-slash');
});
it('should not strip stuff from path just because it looks like Windows drive when its not',
function() {
location = new LocationHashbangUrl('http://server/pre/index.html', '#');
location.$$parse('http://server/pre/index.html#http%3A%2F%2Fexample.com%2F');
expect(location.url()).toBe('/http://example.com/');
expect(location.absUrl()).toBe('http://server/pre/index.html#/http://example.com/');
});
});