Steps to reproduce: 1. Compose a message where any header field (such as Subject: or To:) is long enough to be folded (over 80 or so characters) 2. View the message's header fields in the message view. Actual results: The header field is displayed with spaces where CRLF was used for folding (results in two consecutive spaces where there should be one space) Expected results: The CRLFs used for folding are not displayed in any way (per RFC 5322, section 2.2.3). The message list pane appears to display the headers as expected.
Clarification: The length of a header field is not the sole determinant of whether this bug will manifest. Other factors include whether the header contains whitespace and whether the CRLF WSP is preceded and proceeded by an "encoded-word" as defined in RFC 2047. Test cases: Composing a message with the subject "a long subject. very long. quite long. so long, it might need to be wrapped" displays an extra space between "be" and "wrapped" in the message view, due to this bug. Composing a message to "example@example.com", "example@example.net", "example@example.org" and "example@example.test" displays an extra space after "example.org," in the message view, due to this bug.
Created attachment 2318 [details] Fixes message view's incorrect header unfolding. (the timestamps are weird because I created the folders after testing the fix) I must admit I don't know why this argument was originally FALSE, but after this change I see no unintentional effects.
After checking the commit in which said line was added, the reason it was originally FALSE appears to have been an æsthetic choice only: > * src/procheader.[ch] > o added procheader_get_one_field_asis() that does not do > unfolding > o fix procheader_get_header_array_asis() to use the above, > fixing ugliness of headers in textview meaning it shouldn't break anything by being changed, I think. Regardless of whether that commit was "fixing ugliness" at the time, its only effect now is having incorrect spaces in headers.
ack no wait after that there's > * src/compose.c > o don't unfold headers when redirecting. That might be affected by my change. However I don't know whether that's significant.
Created attachment 2319 [details] Fixes message view's incorrect header unfolding WHILE keeping headers unmodified on redirect. In case keeping headers unmodified on redirect is important, this patch fixes the incorrect displaying while not affecting how the headers are handled when redirecting. The function "procheader_get_header_array_asis" I renamed to "procheader_get_header_array" since it is no longer "as-is".
now fixed in git. thanks for the patch (it just missed the update to procheader.h)