Link hover in location bar: some URLs not handled properly because of broken regexp

RESOLVED FIXED in Firefox 4.0b7

Status

()

defect
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: GPHemsley, Assigned: adw)

Tracking

Trunk
Firefox 4.0b7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

9 years ago
Since the move of the link hover data from the status bar to the location bar, it does not appear that JavaScript URLs are handled properly.

For example, this code:
<a href="javascript:popup('http://www.worldcommunitygrid.org/help/viewTopic.do?shortName=points#177','points',550,650)" class="contentLinkBold">Points<br>Generated</a>

Shows this in the location bar:
http://www.worldcommunitygrid.org/help/viewTopic.do?shortName=points#177','points',550,650)

Notice how the parsing of the href starts at the "http://", instead of the "javascript:", but then swallows up the rest of the JavaScript code, too.
(Assignee)

Comment 1

9 years ago
Posted patch patch (obsolete) — Splinter Review
The regexp used to parse the URL is busted.  This is embarrassing.

Thanks for filing the bug.
Assignee: nobody → adw
Status: NEW → ASSIGNED
Attachment #476704 - Flags: review?(dao)
(Assignee)

Updated

9 years ago
Summary: Link hover in location bar: JavaScript URLs not handled properly → Link hover in location bar: some URLs not handled properly because of broken regexp
Attachment #476704 - Flags: review?(dao) → review+
We could probably write a simple little test for this so we don't regress it in the future, right?
(Assignee)

Comment 3

9 years ago
No code changes, only tests.
Attachment #476704 - Attachment is obsolete: true
Attachment #476924 - Flags: review?(dao)
Attachment #476924 - Flags: review?(dao) → review+
(Assignee)

Updated

9 years ago
Whiteboard: [can land]
(Assignee)

Comment 4

9 years ago
Comment on attachment 476924 [details] [diff] [review]
patch with test

Requesting approval2.0, simple one-line fix to a bug, comes with test.
Attachment #476924 - Flags: approval2.0?
Attachment #476924 - Flags: approval2.0? → approval2.0+
(Assignee)

Comment 5

9 years ago
http://hg.mozilla.org/mozilla-central/rev/c89a4257d902
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 4.0b8
(Assignee)

Updated

9 years ago
Whiteboard: [can land]
(Assignee)

Comment 6

9 years ago
Had to back out because I can't land a bug without causing orange.

http://hg.mozilla.org/mozilla-central/rev/9c4a8b86ac0d
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: Firefox 4.0b8 → ---
(Assignee)

Comment 7

9 years ago
Landed again last night, no orange in nearly 24 hours, calling fixed.

http://hg.mozilla.org/mozilla-central/rev/deb3fe09a0d9
Status: REOPENED → RESOLVED
Last Resolved: 9 years ago9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 4.0b8
(Assignee)

Comment 9

9 years ago
Thanks Kyle.  There's no way this bug caused that regression, so I'll comment at the other bug in the push, bug 597338, which is the likelier candidate.  (But I don't think it regressed either.)
Target Milestone: Firefox 4.0b8 → Firefox 4.0b7
You need to log in before you can comment on or make changes to this bug.