fix(UrlResolver): encode URLs before resolving

This commits makes JS implementation to behave like Dart one.

Fixes #3543

Closes #3545
This commit is contained in:
Pawel Kozlowski
2015-08-08 09:25:24 +02:00
parent 86eb46af09
commit 4f5e405676
2 changed files with 9 additions and 1 deletions
@@ -70,5 +70,13 @@ export function main() {
expect(resolver.resolve('foo/baz/', '/bar')).toEqual('/bar');
});
});
describe('corner and error cases', () => {
it('should encode URLs before resolving', () => {
expect(resolver.resolve('foo/baz', `<p #p>Hello
</p>`))
.toEqual('foo/%3Cp%20#p%3EHello%0A%20%20%20%20%20%20%20%20%3C/p%3E');
});
});
});
}