Don't format HTML (inserting line break) if draft mode

NEW
Unassigned

Status

MailNews Core
Composition
4 years ago
2 years ago

People

(Reporter: m_kato, Unassigned, NeedInfo)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

When saving / sending mail, we use nsIDocumentEncoder with nsIDocumentEncoder::OutputFormatted.

nsIDocumentEncoder::OutputFormatted insert line break per wrap length.  So when composing mail then saving it as draft, line break may be unfortunately inserted.

So we should use nsIDocumentEncoder::OutputRaw when saving as draft.  When sending mail, nsMsgComposeAndSend is re-created, so we should use OutputFormatted with deliver mode only.

And force text mode, HTML text will be converted in nsMsgAttachmentHandler::UrlExit().  So we keep raw mode for format=flowed.
Created attachment 8347837 [details] [diff] [review]
v1

Comment 2

2 years ago
Does this still happen? Current behaviour per comment 0 looks wrong, and proposal of comment 0 looks right! :)

Comment 3

2 years ago
Joshua, can you comment?
Flags: needinfo?(Pidgeot18)
Assignee: m_kato → nobody
You need to log in before you can comment on or make changes to this bug.