Last Comment Bug 704016 - Enable View Source for .eml files and port |Bug 550478 - Attached .eml - Other Actions --> View Source - only shows body|
: Enable View Source for .eml files and port |Bug 550478 - Attached .eml - Othe...
Status: RESOLVED FIXED
:
Product: SeaMonkey
Classification: Client Software
Component: MailNews: Message Display (show other bugs)
: Trunk
: All All
: -- enhancement (vote)
: seamonkey2.8
Assigned To: Jens Hatlak (:InvisibleSmiley)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-20 14:43 PST by Jens Hatlak (:InvisibleSmiley)
Modified: 2011-11-25 16:49 PST (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch [Checkin: comment 2] (2.49 KB, patch)
2011-11-20 14:43 PST, Jens Hatlak (:InvisibleSmiley)
mnyromyr: review+
mnyromyr: superreview+
Details | Diff | Splinter Review

Description Jens Hatlak (:InvisibleSmiley) 2011-11-20 14:43:38 PST
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.)
Comment 1 Karsten Düsterloh 2011-11-25 10:09:22 PST
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?
Comment 2 Jens Hatlak (:InvisibleSmiley) 2011-11-25 16:48:44 PST
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.

Note You need to log in before you can comment on or make changes to this bug.