mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-23 05:04:42 +00:00
Add url encoding option to URL.resolve
Given: a.href = "over 9000!" Then: a.href === BASE_URL + '/over%209000!'; This commits adds an escape: bool option to URL.resolve which will escape the path, query and fragment when true. Also changes the Anchor, Image, Link and IFrame getSrc to escape. Escaping is also used when navigating a frame.
This commit is contained in:
@@ -245,3 +245,11 @@
|
||||
testing.expectEqual('', b.toString());
|
||||
}
|
||||
</script>
|
||||
|
||||
<script id=url_encode>
|
||||
{
|
||||
let a = document.createElement('a');
|
||||
a.href = 'over 9000!';
|
||||
testing.expectEqual(testing.BASE_URL + 'element/html/over%209000!', a.href);
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user