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)

RESOLVED FIXED

Status

defect
RESOLVED FIXED
13 years ago
11 years ago

People

(Reporter: masayuki, Assigned: masayuki)

Tracking

({regression})

Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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
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)
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: 13 years ago
Resolution: --- → FIXED
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.