Closed Bug 29213 Opened 25 years ago Closed 25 years ago

Plain text part double-formatted

Categories

(MailNews Core :: Composition, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: BenB, Assigned: rhp)

Details

Attachments

(2 files)

Reproduce: Create a msg with the HTML editor with the following content and send it in "Both plain text and HTML": *hello* b@b.com Actual result: The plain text part reads: **hello** b@b.com <"b@b.com"> (ignore the quotes, that's bug #29211) Expected result: The plain text part reads: *hello* b@b.com Proposed fix: I guess, we first run the mail through the HTML enhancer mozTXTToHTMLConv::ScanHTML and then convert the result to plain text. We should convert the the result of the editor directly to plain text.
reassign to rhp
Assignee: ducarroz → rhp
I've tried this in all sorts of combinations and I can't recreate this problem on Win32 or Linux so I am marking as such. - rhp
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → WORKSFORME
rhp, see <news://news.mozilla.org/38B5EC8F.9060802@netscape.com> ("Mozilla source tree is open... but..." in .seamonkey) for an example, look out for "VERY". I tried it several times before filing that bug.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Maybe I'm missing something, but please tell me what is wrong with the two images that I have attached. The first is 4.x and the second is 5.x...they look identical to me? - rhp
Attached image What it looks like in 4.x (deleted) —
Attached image The Seamonkey view (deleted) —
Status: REOPENED → ASSIGNED
The problem is in the plain text part. Mozilla and 4.x display only the HTML part, if available, in the msg view, so you can see the problem only in their "View Source". You will find a "**VERY**" there.
Ok, the text enhancement was being applied to the conversion of the HTML to plain text on the sending operation. This shouldn't be done since we should be sending the original "plain text" (not what we render to the user). I have a fix in my tree and will checkin with everything else when the tree opens for M15. - rhp
Summary: Plain text part double-formatted → [FIXED] Plain text part double-formatted
Target Milestone: M15
rhp, I don't understand you fully. What IMO should be done (and what 4.x basically did) is the following: The HTML source (what the user generated using the HTML editor) should be run through ScanHTML and the output of this function send as HTML part. The HTML source again (HTML part of the msg) should be run through nsHTMLToTXTSinkStream (with OutputFormatted) and the output of this class send as plain text part. Guessed old code: +------------------------------> HTML part HTML source ---> ScanHTML ---+ +---> nsHTMLToTXTSinkStream ---> TXT part Proposed new code: +---> ScanHTML ------------------------------> HTML part HTML source --+ +---> nsHTMLToTXTSinkStream -----------------> TXT part
> (and what 4.x basically did) In effect, not in code. Since 4.x didn't have so much formatting functionality, both shown versions would (propably) have in the same result.
Ok...after I looked at it again, I have it working the way you describe (in theory). - rhp
Good. Thanks for fixing.
Now working off of original input for HTML-TXT conversion. - rhp
Status: ASSIGNED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
Summary: [FIXED] Plain text part double-formatted → Plain text part double-formatted
Linux (2000-04-21-08 M16) Win32 (2000-04-21-09 M16) Mac (2000-04-21-08 M16) The plain text part now reads *hello* b@b.com on Won32 and Linux. However, due to bug 35501, html tag exists for plain text on Mac. I am going to leave this bug until bug 35501 is fixed. If you disagree, please advise.
changing qa
QA Contact: lchiang → esther
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: