Open Bug 208128 Opened 21 years ago Updated 2 years ago

paste as quotation: pasted text is not wrapped if original was flowed or HTML

Categories

(MailNews Core :: Composition, defect)

defect

Tracking

(Not tracked)

People

(Reporter: jlemay, Unassigned)

References

Details

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b) Gecko/20030516 Mozilla Firebird/0.6
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b) Gecko/20030516 Mozilla Firebird/0.6

Pasting text from a message with original message charset defined as "utf-8" or
just "text/plain" results in no wrapping of the text. The pasted text appears as
a single (long) pasted line. If the original charset was set to "ISO-8559-1",
the pasted text is properly wrapped.

Reproducible: Always

Steps to Reproduce:
1. find a "utf-8" or "text/plain" encoded message by examining headers on an
existing message 
2. highlight some text from that message (multiple lines) and copy
3. paste as quote into new message

Actual Results:  
Pasted text was not wrapped. Several lines from the original message are pasted
onto a single line in the new message.

Expected Results:  
Original wrapping of the message, or wrapping at the value defined in the prefs,
should have been performed.

This bug seemed to start in 1.4a or 1.4b. 1.3.0 did not seem to show this behaviour.
Just a follow up, I'm still seeing this bug in 1.4 ("ga") and it seems it has
been carried over into the lastest TB build (07022003, linux).
I've attempted to duplicate this bug, and I am not seeing a problem based on 
charset.

One thing I notice: every email in my box that specifies ISO-8859-1 does not 
also specify format=flowed; the linebreaks are hard, and so the lines appear, in 
the quoted text, with reasonable breaks, but not necessarily wrapped to the 
user's preferred wrap column.  f=f text, when copied, eats all the line breaks; 
and then Paste-as-Quote pastes it all in as one line.  (Edit|Rewrap will turn 
the text into something more reasonable, if you need a workaround, altho it has 
its own problems.)

I created an ISO-8859-1 message *with* f=f (I had to include some upper-half 
characters to make that transmit as expected, rather than as "us-ascii"); when I 
pasted the text from that message, the line breaks were eaten and the text 
appeared as one line.

I created a UTF-8 message *without* f=f; when I pasted the text from that 
message, the line breaks were in place.

Reporter (jlemay): does this correlate to what you are seeing?  If not, could 
you attach a sample message which contains text that you would expect to see 
wrapped when Pasted-as-Quote?  (Save the message as a .eml file, attach to this 
bug using the 'Create a New Attachment' link above.)
Just created an attachment containing a message that when copied from and
pasted-as-reply causes the incorrected wrapping issue. Hope it helps! This was
just checked in Tb 0.2. I haven't tried with a 0.3rc yet.
OK: That particular email has very long source lines -- each paragraph is a 
single line, with no hard breaks.  (You can see this by examining the source of 
the message with Ctrl-U.)  So when a paragraph, say, is copied to the clipboard, 
and then inserted via Paste as Quotation, the line is inserted at full length.

I agree that it should wrap; I don't think the problem has anything to do with 
the character set.  To verify this, please check an email that does wrap as 
expected on P-as-Q, and confirm whether that email is (a) composed in the source 
with normal-length (< 80 char) lines, and (b) *not* format=flowed (as seen in 
the Content-Type: header).
See also bug 196033.
Ok, this took some time for me to track down some messages that were long enough
- and get enough samples from various places - to check this out properly. 

I don't think Content-Type format=flowed is the issue so much as when
Content-Type is "multipart/alternative". Does this mean the issue is due a
message received in both html and text formats?

I will create two new attachments for analysis.
In the 'bad' message, there are two parts: a text/plain, and a text/html.

If you are viewing the HTML form of the message (as happens by default), all 
those lines are internally joined together into a single line which can reflow 
as one expects HTML to do.  Therefore, you get the same results -- a long 
unwrapped line -- as with format=flowed plaintext.

If you view the plain text form of the message (View|Message Body|Plain), and 
copy and paste-as-quotation, the text is pasted in with expected line breaks.

At any rate: this is definitely an issue; in particular, text that Mozilla 
copied from an email it already knows is f=f or HTML, or text that is marked as 
HTML in the clipboard, should be wrapped with P-as-Q.  I'm confirming this bug; 
updating the summary for accuracy; updating the platform; and reducing the 
severity -- this bug does not involve a loss of function.

As a workaround, Edit|Rewrap (in the Compose window) will fix the wrapping for 
the quoted line(s).  (Edit|Rewrap does work on a selected text, but there a few 
bugs with that.)
Severity: major → normal
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: PC → All
Summary: pasted, quoted text is improperly wrapped depending on charset defined in headers of original message → paste as quotation: pasted text is not wrapped if original was flowed or HTML
Product: MailNews → Core
*** Bug 271926 has been marked as a duplicate of this bug. ***
sorry for the spam.  making bugzilla reflect reality as I'm not working on these bugs.  filter on FOOBARCHEESE to remove these in bulk.
Assignee: sspitzer → nobody
Filter on "Nobody_NScomTLD_20080620"
QA Contact: esther → composition
Product: Core → MailNews Core
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: