This repository was archived by the owner on Apr 12, 2024. It is now read-only.
IPv6 address returned from $location.host() does not include the brackets in IE/Edge #16692
Closed
1 of 3 tasks
Labels
Milestone
I'm submitting a ...
Current behavior:
For example, when the URL is
https://[fd12:3456:789a:74::27]
,$location.host()
returnsfd12:3456:789a:74::27
in IE/Edge.This is because
host
andhostname
ofa
tag element returns the address without bracket, when we useurlParsingNode
, and we use it inurlResolve
directly:angular.js/src/ng/urlUtils.js
Lines 75 to 86 in eb0ccc6
Expected / new behavior:
$location.host()
should return the IPv6 address with the brackets. i.e. [fd12:3456:789a:74::27]Minimal reproduction of the problem with instructions:
Call $location.host() at a IPv6 address using IE/Edge
AngularJS version: 1.7.4
Browser: [ Edge 42.17134.1.0 | IE 11.228.17134.0 ]
Anything else:
I suggest that we can check if the address is in IPv6 format, and add brackets to it if it doesn't exist. Not necessary to check if it's IE/Edge.
The text was updated successfully, but these errors were encountered: