Closed Bug 67391 Opened 24 years ago Closed 22 years ago

Extra newline is added before quotation text

Categories

(MailNews Core :: Composition, defect, P3)

x86
All
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.2alpha

People

(Reporter: kazhik, Assigned: bugzilla)

References

Details

(Keywords: regression)

Attachments

(1 file)

Extra newline is added before quotation text.

Steps to reproduce:

(1) Select a message and hit Reply button.
(2) Hit Save button. An extra newline is added between recipient
name("<somebody> wrote:") and quotation text.

Build: 2001013004/Win2k

This is a recent regression.
*** Bug 69748 has been marked as a duplicate of this bug. ***
As described in bug 69748, extra newlines are added before and
after quotation.

Every reply messages are affected by this. Changing severity to major.

Severity: normal → major
Keywords: regression
This problem is getting worse. Extra newline is added in message view.
If you save a message and see it, you will see two extra newlines.
Severity: major → critical
OS: Windows 2000 → All
Extra newlines are increasing... :-(

> "AIUEO"(in Japanese code)
> "KAKIKUKEKO"
> "SASISUSESO"

If you send a message containing the above quotation, The result becomes:

> "AIUEO"(in Japanese code)

> "KAKIKUKEKO"

> "SASISUSESO"
Keywords: intl
The Japanese quotation problem is seen on Win32 build.
The problem I reported on 4/9 is not Japanese-specific.

Bug 75498 seems to be related to this bug.
Keywords: intl
Now I see the original problem only.
If you write a HTML message and save it, the message body is written
as the following:

<html>
<head>
</head>
<body>
First<br>
Second<br>
Third<pre class="moz-signature" cols="$mailwrapcol">
</pre>
</body>
</html>

And if you open this message by hitting reply button and save it 
without doing anything,

<html>
<head>
</head>
<body>
KOIKE Kazuhiko wrote:<br>
<blockquote type="cite" cite="mid:3B0B5293.5010800@mozilla.gr.jp"> First<br>
Second<br>
Third</blockquote>
<br>
</body>
</html>


Then a newline is displayed between the reply header "KOIKE Kazuhiko wrote:"
and the quotation. It's a correct behaviour for displaying HTML, but wrong
for displaying mail.

Maybe plain text is processed internally in the same way.

In message pane, a more extra newline is added now.

ABC wrote:

> First
> Second
> Third

This message is displayed:

ABC wrote:


> First
> Second
> Third

A newline shouldn't be added, should be deleted.
Attached patch PatchSplinter Review
Changing the argument #1 of EnsureVerticalSpace() seems to fix this bug.

Could somebody review?

Unless you can proof that this caused the regression, I would object the patch.
The code that you "fix" looks correct. It is used in many cases, and you might
break other ones. ccing HTML->TXT folks.
Yes, when copying from an HTML page you want an empty line to separete 
paragraphs. So while fixing the mail case you break some other cases (including 
copy). 

You must find a way to use 1 as argument to EnsureVerticalSpace at the right 
places and 0 at the right places.

You could also say that the composition window shouldn't use <p> in the internal 
html document at all since <p> has semantics that the user might not accept. I 
don't think we do anything special with <div> so that could be a good 
substitute. The more I think of it the better the <div> instead of <p> sounds or 
is the <p> necessary for some reason?
Does the document in the reply window have a <p>?  The code quoted in this bug
shows <br> but not <p>.  I agree that using a <p> doesn't seem right.

For the plaintext case, I wonder if the patch in bug 69638 might fix this bug? 
I wonder if the extra newline might be coming from the blockquote, and replacing
it with a span might make the problem go away?

For the html case, the <blockquote> probably displays with extra space before
it, so the <br> after the "Joe Blow wrote:" line is extra.  Would it help if
mail stopped adding that br?

I'm leery about putting more <div> tags in mail because 4.x had some problems
with them.  We'd have to test thoroughly with 4.x if we went to that approach
(though aside from that it sounds reasonable).

I agree with Ben and Daniel that changing the serializer to pass a different
argument to EnsureVerticalSpace is the wrong solution: this code is used in
other contexts as well, so hacking it to compensate for an extra newline in the
mail case will probably cause problems elsewhere.
The patch for bug 69638 fixed this bug. 2001071406/Linux works fine.

But another bug for quotation remains. See bug 90834.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
I believe this patch caused bug 91576.

- Adam
This bug is back.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
The patch for bug 69683 has been temporarily turned off, because it turned out
the edit rules didn't play nice with the span.
Status: REOPENED → ASSIGNED
Target Milestone: --- → mozilla0.9.7
*** Bug 100738 has been marked as a duplicate of this bug. ***
Target Milestone: mozilla0.9.7 → mozilla0.9.9
This has been a recurring, reproducable problem since I started using Mozilla
0.9.3.  Currently, I've seen this on 0.9.4/20010913 on Windows 2000 SP2 and was
able to reproduce it with 0.9.5/20011023 on Linux-i686 (Debian Woody). I have
noticed this (or a related) issue in replying to plain-text e-mails as well.
(Described partially in Bug 100738).

If the content of the compose window during a reply is: ([] denotes end/beginning)
[Some One wrote:
>Hey Robb,
>I have a couple questions about using Foo.  Question1? Question2?
>Thanks!]
Wanting to trim out the fat for the reply, I make changes and have the following
in the compose window before sending:
[Some One wrote:
> Question1?

   Answer: Yadda yadda yadda.

> Question2?

   Answer: Yadda yadda yadda.]

What will actually get sent is:
[Some One wrote:

> Question1?


   Answer: Yadda yadda yadda.

> Question2?


   Answer: Yadda yadda yadda.]
An extra line is added below the "wrote:" (see Bug 91576) and below the last
line of each quoted section. To get a single blank line between quoted text and
my reply, I need to omit a blank line from my composition:
[...
> Question1?
   Answer: ...]
Which renders:
[...
> Question1?

   Answer: ...]
And I can't fathom a way to rid myself of the extra line below "wrote:" (again,
crf. Bug 91576 where a discussion of mail formatting etiquette ensued). 

It's a bit frustrating to think I'm editing what should essentially be a plain
text document and find blank lines sneaking in.  This is one of the reasons I
switched to working with plain text e-mails, to avoid the vagaries of HTML
formatting.
Keywords: nsbeta1+
Priority: -- → P3
*** Bug 111154 has been marked as a duplicate of this bug. ***
Blocks: 108194
Have a look at bug 102842 and bug 102819. Are they duplicates of this, or am I
completely mistaken..?
Blocks: 122274
Keywords: nsbeta1+nsbeta1-
Target Milestone: mozilla0.9.9 → mozilla1.2
Somebody fixed this bug a month before.
Is Bug 91576 not a dupe of this? Cf
http://bugzilla.mozilla.org/show_bug.cgi?id=109935#c12, which seems better than
either to explain the problem in terms of what needs doing to fix?
WFM, I actually cannot remember that I ever met this bug. Can we close it?

pi
WFM, as of Mozilla 1.3b [Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
rv:1.3b) Gecko/20030125]. Neither description nor comment #20 are reproducible.
-> fixed
Status: ASSIGNED → RESOLVED
Closed: 23 years ago22 years ago
Resolution: --- → FIXED
Trunk build 2003-05-22: WinMe, Mac 10.1.5
Verified Fixed.
Status: RESOLVED → VERIFIED
QA Contact: esther → nbaca
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: