domain highlighting doesn't work with IPv6 literals

VERIFIED FIXED in Firefox 6

Status

()

defect
VERIFIED FIXED
8 years ago
6 years ago

People

(Reporter: bws42, Assigned: dao)

Tracking

Trunk
Firefox 7
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox6 fixed)

Details

()

Attachments

(1 attachment)

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.

Reproducible: Always
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.
Blocks: 451833
Version: unspecified → Trunk
Posted patch patchSplinter 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.
Assignee: nobody → dao
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #535139 - Flags: review?(sdwilsh)
Comment on attachment 535139 [details] [diff] [review]
patch

I sure do hate me some regular expressions.  r=sdwilsh
Attachment #535139 - Flags: review?(sdwilsh) → review+
http://hg.mozilla.org/mozilla-central/rev/80356fecf627
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 7
Flags: in-testsuite+
Attachment #535139 - Flags: approval-mozilla-aurora?
Verified it works as expected.
Status: RESOLVED → VERIFIED
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.
Attachment #535139 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.