User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0a1) Gecko/20110525 Firefox/7.0a1
Build Identifier: Mozilla/5.0 (X11; Linux x86_64; rv:7.0a1) Gecko/20110525 Firefox/7.0a1
The domain highlighting feature added as part of bug 451833 fails to properly highlight the entire IPv6 address; it stops after the first colon.
There's an example URL in the URL field, it might not work for you as it's a local IPv6 address, but it demonstrates the problem fine.
Created attachment 535139 [details] [diff] [review]
This uses (.+?) for the host instead of ([^\/:]+), which caused this bug by excluding the colon. Since question mark makes .+ nongreedy, (?::\d+)?(?:\/|$) is needed to ensure that the host is followed by an optional port and a slash or the end of the string.
Comment on attachment 535139 [details] [diff] [review]
I sure do hate me some regular expressions. r=sdwilsh
Verified it works as expected.
In the failure case, was the whole domain "graytext" or was it all "black text"?
In the failure case the address was only black to the first colon. So given an address like dead:beef:1234::1 dead was black and the rest was not.