Commit graph

2 commits

Author SHA1 Message Date
Fathi Ben Nasr
7c432e392b MailSo: a folded plain-text line no longer leaves two spaces
Unfolding appended a newline before the continuation line, which kept its
own leading whitespace; Header turns the newline into a space, so every
fold became two spaces ("et  checklist"), carried into reply subjects.
The test now compares exactly.
2026-10-22 20:55:38 +00:00
Fathi Ben Nasr
37fcdbe534 MailSo: keep the folding space before an encoded word that follows a plain word
HeaderCollection::Parse() trimmed the folding whitespace in front of every
continuation line starting with an encoded word. RFC 2047 6.2 ignores only
whitespace BETWEEN two adjacent encoded words; after a plain word, RFC 5322
unfolding keeps it. Symfony Mailer folds subjects exactly there, so
"de vos\r\n =?utf-8?Q?=C3=A9quipements?=" was displayed "voséquipements".
The message list (IMAP ENVELOPE) was fine; the opened message was not.

Test: php test/header-unfold.php (fails before the fix).
2026-10-22 20:55:38 +00:00