Enable View Source for .eml files and port |Bug 550478 - Attached .eml - Other Actions --> View Source - only shows body|

RESOLVED FIXED in seamonkey2.8

Status

SeaMonkey
MailNews: Message Display
--
enhancement
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: InvisibleSmiley, Assigned: InvisibleSmiley)

Tracking

Trunk
seamonkey2.8

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Created attachment 575776 [details] [diff] [review]
patch [Checkin: comment 2]

Currently, View Source is disabled for .eml messages (whether they are on the file system or attached to another message). This bug is about changing that, plus making sure that View Source on HTML messages attached to other messages works correctly (which was fixed for TB in bug 550478).

STR:
1. Create and HTML email and save it as a draft
2. Create a second email, attach the first to it and save the second one as a draft
3. View the second message, open the attached HTML email and use View Source on it

Example internal url value:
mailbox:///home/jens/.mozilla/seamonkey/12345678.test/Mail/Local%20Folders/Drafts?number=12345&part=1.2&filename=Attached%20Message.eml&type=application/x-message-display
(It seems that compared to TB or under different circumstances, the order of parameters varies, so I made the ampersand in the regex optional.)
Attachment #575776 - Flags: review?(mnyromyr)

Comment 1

6 years ago
Comment on attachment 575776 [details] [diff] [review]
patch [Checkin: comment 2]

>+            url = url.replace(/type=application\/x-message-display&?/, "");

Most correct would be
  url.replace(/(\?|&)type=application\/x-message-display(&|$)/, "$1").replace(/\?$/, "");

r/moa=me with that.


I also noted that if you hit 'save' in the opened .eml window, the resulting is broken (it's the html code of the message pane shown o_O) - do you happen to know if there's a bug on this already?
Attachment #575776 - Flags: superreview+
Attachment #575776 - Flags: review?(mnyromyr)
Attachment #575776 - Flags: review+
(Assignee)

Comment 2

6 years ago
Comment on attachment 575776 [details] [diff] [review]
patch [Checkin: comment 2]

http://hg.mozilla.org/comm-central/rev/0a2f98807054
with nits addressed

(In reply to Karsten Düsterloh from comment #1)
> I also noted that if you hit 'save' in the opened .eml window, the resulting
> is broken (it's the html code of the message pane shown o_O) - do you happen
> to know if there's a bug on this already?

No idea, sorry, but I see it, too.
Attachment #575776 - Attachment description: patch → patch [Checkin: comment 2]
(Assignee)

Updated

6 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.8
You need to log in before you can comment on or make changes to this bug.