Closed Bug 344816 Opened 19 years ago Closed 19 years ago

Don't break between ASCII non-space characters in nsPlainTextSerializer/nsHTMLContentSerializer (the long URL is broken at sending mail or copying the text on Thunderbird)

Categories

(MailNews Core :: Composition, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

(Keywords: regression)

Attachments

(1 file)

This is a regression of bug 255990. Now, we can break a line between non-ASCII characters. But for nsPlainTextSerializer, this is not good if the format is flowed. RFC 2646 4.1: > A generating agent SHOULD NOT insert white space into a word (a > sequence of printable characters not containing spaces). If faced > with a word which exceeds 79 characters (but less than 998 > characters, the [SMTP] limit on line length), the agent SHOULD send > the word as is and exceed the 79-character limit on line length.
Status: NEW → ASSIGNED
OS: Windows 2000 → All
Hardware: PC → All
To reproduce, just do a File | Send Page in SeaMonkey (Firefox only has Send Link). Inside of a multipart/mixed; MIME section, another Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit will break links as such: http:// weblogs.mozillazine.org/justin/2006/06/ (note the space after the double forward slashes)
I created the patch and now testing, please wait a moment.
I think that we should not *always* break between ASCII characters. Because even if it's not a flowed format, the URL is broken by CRLF in sending process too (e.g., Japanese lang email).
Summary: Don't break between ASCII non-space characters if format=flowed → Don't break between ASCII non-space characters in nsPlainTextSerializer
I found two bugs as this behavior. 1. the copy command is broken on Tb. 2. the sending mail source code is broken on Tb. Both bugs are happen by nsILineBreaker::Prev and nsILineBreaker::Next. I think that we need additional parameter that is whether it allows breaking between latin1. I'll attach the patch tomorrow.
Summary: Don't break between ASCII non-space characters in nsPlainTextSerializer → Don't break between ASCII non-space characters in nsPlainTextSerializer/nsHTMLContentSerializer
Attached patch Patch rv1.0Splinter Review
Attachment #229450 - Flags: review?(jshin1987)
Summary: Don't break between ASCII non-space characters in nsPlainTextSerializer/nsHTMLContentSerializer → Don't break between ASCII non-space characters in nsPlainTextSerializer/nsHTMLContentSerializer (the long URL is broken at sending mail or copying the text on Thunderbird)
Attachment #229450 - Flags: review?(jshin1987)
backed-out the original patch. I'll retry to fix it with UAX#14. If you have some ideas and suggestions, please tell me. -> FIXED(by backed-out)
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: