Open Bug 1274283 Opened 10 years ago Updated 3 years ago

Thunderbird shall not trim text, it corrupts inline quotes of diff patches

Categories

(Thunderbird :: Preferences, defect)

49 Branch
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: contact, Unassigned)

Details

User Agent: Opera/9.80 (Windows NT 6.1; WOW64) Presto/2.12.388 Version/12.18 Steps to reproduce: Try to send a message with an almost empty line, containing only one whitespace before the linebreak. The "diff" patch format uses the first character in a line to flag lines to be deleted (signaled by a line which starts with a '-'), lines to be inserted (signaled by a line which starts with a '+'), or lines to use as reference (each 3 lines before and after a change must match the current content) but skip unaltered (signaled by a line which starts with a whitespace; a completely empty line in the source will appear as line with only a whitespace in a patch). Actual results: Thunderbird trims the line containing a whitespace before a linebreak so that the whitespace is removed, and only an empty line is sent. If you try to use the inline-quoted text as a patch file for diff, the processing of the patch will stop at the empty line, which is not desired. Expected results: The line should still contain the whitespace, letting diff know that there is an empty line in the source to be skipped, but more lines in the patch follow. With Thunderbird automatically trimming seemingly empty lines, sending a diff patch requires to attach it after the mail (where it has to be saved first before it can be read), instead of just pasting it in the body (where it is easily readable). Attachments are not trimmed. It is possibly useful to have an option not to trim trailing spaces from entered text when sending a mail, so that content which relies on spaces is not harmed.
I should have searched for "wrap" instead of "trim"... The reason for trimming also short lines is an enabled line wrap feature. The solution is to disable it completely, by defining: mailnews.wraplength = 0
I assume we're talking about plain text mail here. If this is sent with format=flowed, then space adjustment will take place. Please check your preference: mailnews.send_plaintext_flowed

Any renewed interest? It's not a major issue, but it is annoying. :)

(still seen with Thunderbird 91.9.0)

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.