Closed
Bug 33492
Opened 26 years ago
Closed 25 years ago
html-to-plaintext message conversion double-spaces lines
Categories
(MailNews Core :: Composition, defect, P3)
Tracking
(Not tracked)
VERIFIED
WORKSFORME
M18
People
(Reporter: akkzilla, Assigned: rhp)
Details
(Whiteboard: [nsbeta2-])
Send yourself a plaintext message containing a paragraph of wrapped text.
Reply to this message in html.
A few lines into the paragraph, set the caret near the end of a line and hit
return to split the quotation, and type a line of text.
Send the message as plaintext
The quoted text before the inserted line look fine; but all the quoted lines
after the first insertion are double-spaced, i.e. they look like
> blah blah [ ... ] blah
>
> blah blah
>
OutputText from the compose window does not do this (though it does add some
empty quoted lines immediately after the new line), so I think this is happening
in mail code after the output system is finished.
| Assignee | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → M18
| Reporter | ||
Comment 1•26 years ago
|
||
Putting on radar for beta2 consideration, since quoting replies properly is part
of mail dogfood. I can probably help with this, at least with tracking it down,
if Rich is overloaded.
Keywords: beta2
| Assignee | ||
Comment 2•26 years ago
|
||
Akkana,
If you want to help with this...feel free, but I will not get to it before Beta
2 because I am focused on FEATURE development at this point.
- rhp
Comment 3•26 years ago
|
||
akk,
1. I don't think, this is related to my converter, as it shouldn't touch newlines.
2. I *do* see the problem in the editor output.
I have a slightly modified viersion (my fix for bug #31906), but I see something
like
<body>bugzilla-daemon@mozilla.org wrote:<br>
<blockquote type="cite" cite="200003272225.OAA05229@lounge.mozilla.org">
<div class="text-plain"><pre>
(Tired of this old junk? There is a new experimental email scheme in
Bugzilla. If you're feeling brave, you can try it by turnin</pre></div>
</blockquote>
<br>
sorzu epotriz+ep ru zpeuz twwwwwwwwwwwwwwww+wtttttttt
zwüotze+ züoezt0wzzzzzüwwwwww<br>
<blockquote type="cite" cite="200003272225.OAA05229@lounge.mozilla.org">
<div class="text-plain">
<pre>
g on the<br>
new pref at http://bugzilla.mozilla.org/userprefs.cgi?bank=diffs)<br>
<br>
http://bugzilla.mozilla.org/show_bug.cgi?id=33492<br>
<br>
*** shadow/33492 Mon Mar 27 14:10:37 2000<br>
--- shadow/33492.tmp.5220 Mon Mar 27 14:25:14 2000<br>
***************<br>
*** 40,42 ****<br>
--- 40,49 ----<br>
[...]
+ 2 because I am focused on FEATURE development at this point.<br>
+ </pre>
</div>
</blockquote>
etüiutrzpprutz
<blockquote type="cite" cite="200003272225.OAA05229@lounge.mozilla.org">
<div class="text-plain">
<pre>
<br>
Note, that there are <br>s in the second blockquote, but not in the first - most
likely the reason for the bug. There should be no <br>s, I think.
Comment 4•26 years ago
|
||
(Ignore the extra newlines in the last comment, this is a
bugzilla-with-mozilla-bug.)
| Reporter | ||
Comment 5•26 years ago
|
||
Short steps to reproduce this problem:
1. Send yourself a plaintext message containing the following text:
---
one
two
three
---
2. Read it in mozilla, and reply to it in html compose. While the compose
window is up, do Debug->OutputHTML and Debug->OutputText to see what the normal
output converters do. You get:
OutputHTML:
<html><head></head><body>akkana@netscape.com (Akkana Peck) wrote:<br>
<blockquote type="cite" cite="38FF6417.A6A66529@netscape.com">
<pre wrap>
one<br>
two<br>
three<br>
</pre>
</blockquote>
<br>
<br>
</body>
</html>
OutputText:
akkana@netscape.com (Akkana Peck) wrote:
>
> one
> two
> three
3. Send this message in plaintext. When it arrives, it looks like this:
akkana@netscape.com (Akkana Peck) wrote:
>
> one
>
> two
>
> three
>
Note that the plaintext output is exactly what we want, whereas the html output
has both br tags and newlines inside a pre, which is probably incorrect.
In other words, plaintext mail didn't go through the normal plaintext output,
which would have gotten it right; instead, mail got the html output and then
went through some other means to convert it to plaintext.
I need to fix the html problem anyway (bug 36188 is filed on ducarroz, but it's
probably my bug and I'm going to look at it now) but I'm curious why we're not
using the html->text conversion code in nsHTMLToTXTSinkStream that we spent so
long trying to get right? Do we have similar code in several different places
now that's getting out of synch?
Keywords: beta2
Comment 6•26 years ago
|
||
akk,
1. try the following:
1. In Mozilla's HTML composer, mark the word "two" bold.
2. Debug->Output Text shows: ..."*two*"...
3. Now send as plaintext and read it. You'll also see ..."*two*"...
2. nsHTMLToTXTConv is the only HTML->TXT converter in Mozilla,
which handles bold this way.
3. 1. && 2. => Mailnews does use nsHTMLToTXTConv.
So, should me mark this a dup?
| Reporter | ||
Comment 7•26 years ago
|
||
I still don't understand why we're seeing double-spaced lines in plaintext mail,
then, when OutputText doesn't show double spaced lines. Obviously something is
different ...
It's about to become academic, though, because I have a fix for the html problem
(bug 36188), so the html output will no longer have <br>NS_LINEBREAK.
Putting on [nsbeta2-] radar due to workaround that akkana will do.
Whiteboard: [nsbeta2-]
| Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → WORKSFORME
| Assignee | ||
Comment 9•25 years ago
|
||
This seems to work ok for me now...am I wrong?
- rhp
| Reporter | ||
Comment 10•25 years ago
|
||
rhp: If you read upward, I checked in a workaround that masked what we thought
the real problem was, and this bug was staying open for someone to figure out
why we were saving as html in the first place rather than just saving as
plaintext since that was the format we knew we were going to.
Comment 11•25 years ago
|
||
Linux (2000-07-28-04 M17)
Win32 (2000-07-28-12 M17)
Mac (2000-07-26-08 M17)
I cannot re-produce this bug using the scenario described by the reporter.
Akkana, please advise what more needs to be done.
thanks
| Reporter | ||
Comment 12•25 years ago
|
||
Sigh ... never mind, I guess we'll have to file a separate bug on the
performance problems caused by converting to html first and then to plaintext,
rather than going straight to plaintext, if it shows up on performance analysis.
Status: RESOLVED → VERIFIED
Updated•21 years ago
|
Product: MailNews → Core
Updated•17 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•