Closed Bug 1384853 Opened 2 years ago Closed 2 years ago

Handle <a href=""> in documents better by returning base URL from NewURI()

Categories

(MailNews Core :: Networking, enhancement)

enhancement
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 57.0

People

(Reporter: jorgk, Assigned: jorgk)

Details

Attachments

(3 files, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #1383847 +++
No longer depends on: 1383847
As per bug 1383847 comment #4 it makes sense to return the base URI when an empty spec is passed into NewURI() originating from a link <a href="">.

Or if we decide not to do it, we should catch the condition early.
Assignee: nobody → jorgk
Status: NEW → ASSIGNED
Attachment #8890746 - Flags: review?(rkent)
Attached file test empty link.eml (obsolete) —
Test message with empty link. Now shows the mailnews URL when hovered and clicking onto it opens the message in FF (if so configured).

Alternative: Leave existing behaviour, and catch condition early.
Also with a link with a reference.
Attachment #8890747 - Attachment is obsolete: true
It will be a few days, or maybe a week, before I can look at this again.
Not the most pressing issue ;-) It works now, albeit with a lot of debug noise.
Comment on attachment 8890746 [details] [diff] [review]
1384853-empty-href.patch (v1).

Review of attachment 8890746 [details] [diff] [review]:
-----------------------------------------------------------------

OK, seems to work, and I can't think of a downside. r+=me
Attachment #8890746 - Flags: review?(rkent) → review+
Sorry Kent to present this again, but there is a simpler solution.
Attachment #8893223 - Flags: review?(rkent)
Oh, I've changed the logic a bit so everything returns at the end of the function now.
Comment on attachment 8893223 [details] [diff] [review]
1384853-alternative.patch (v1).

Review of attachment 8893223 [details] [diff] [review]:
-----------------------------------------------------------------

OK, this is fine too.
Attachment #8893223 - Flags: review?(rkent) → review+
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/e11801dc68c0
Handle <a href=''> in documents better by returning base URL in nsMsgMailNewsUrl::Resolve(). r=rkent
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 57.0
You need to log in before you can comment on or make changes to this bug.