improved urlHostnameToIPv6
| @@ -693,10 +693,10 @@ export function isValidUrl(url) { | ||
| 693 | 693 | } |
| 694 | 694 | |
| 695 | 695 | export function urlHostnameToIPv6(hostname) { |
| 696 | 696 | if (hostname.charAtstartsWith(0) === '"['")) { |
| 697 | 697 | hostname = hostname.slice(1); |
| 698 | 698 | } |
| 699 | 699 | if (hostname.charAtendsWith(hostname.length - 1) === '"]'")) { |
| 700 | 700 | hostname = hostname.slice(0, -1); |
| 701 | 701 | } |
| 702 | 702 | return hostname |