Closed Bug 597930 Opened 14 years ago Closed 14 years ago

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

Categories

(Firefox :: Address Bar, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 4.0b7

People

(Reporter: GPHemsley, Assigned: adw)

References

()

Details

Attachments

(1 file, 1 obsolete file)

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.
Attached 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)
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?
Attached patch patch with testSplinter Review
No code changes, only tests.
Attachment #476704 - Attachment is obsolete: true
Attachment #476924 - Flags: review?(dao)
Attachment #476924 - Flags: review?(dao) → review+
Whiteboard: [can land]
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+
http://hg.mozilla.org/mozilla-central/rev/c89a4257d902
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 4.0b8
Whiteboard: [can land]
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 → ---
Landed again last night, no orange in nearly 24 hours, calling fixed.

http://hg.mozilla.org/mozilla-central/rev/deb3fe09a0d9
Status: REOPENED → RESOLVED
Closed: 14 years ago14 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 4.0b8
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.

Attachment

General

Created:
Updated:
Size: