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.
This commit is contained in:
Fathi Ben Nasr 2026-10-22 20:55:38 +00:00
parent 37fcdbe534
commit 7c432e392b
2 changed files with 5 additions and 6 deletions

View file

@ -43,7 +43,8 @@ $cases = [
"Hello\r\n world" => 'Hello world',
];
foreach ($cases as $raw => $want) {
$got = preg_replace('/\s+/', ' ', subject($raw));
// exact: a fold is one space, never two ("et checklist" ended up in replies)
$got = subject($raw);
check($got === $want, "got [{$got}], want [{$want}]");
}