Closed Bug 659693 Opened 14 years ago Closed 14 years ago

domain highlighting doesn't work with IPv6 literals

Categories

(Firefox :: Address Bar, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 7
Tracking Status
firefox6 --- fixed

People

(Reporter: bws42, Assigned: dao)

References

()

Details

Attachments

(1 file)

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
Attached 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+
Status: ASSIGNED → RESOLVED
Closed: 14 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.

Attachment

General

Created:
Updated:
Size: