There is a very serious problem in SquirrelMail, where
certain lines aren't displayed at all in plain text
messages.
In our case, those messages are usually encoded in
ISO-8859-2, while the configured default charset for
SquirrelMail is UTF-8. Squirrelmail recodes them
correctly when displaying, but some lines are "eaten"
After debugging I've discovered that the problem is
located in functions/strings.php, in the sqWordWrap()
function.
On the problematic lines, the following regular
expression doesn't match at all:
ereg("^([\t >]*)([^\t >].*)?$", $line, $regs);
So the lines are assumed to be empty, although they
contain text.
As a result, the text isn't displayed - an empty line
is displayed instead.
The fix that works around the issue for me is replacing
this code:
$words = '';
...with this code:
$words = explode(' ', $line);
I suppose that this could break something so a
SquirrelMail developer should review this fix.
I'm attaching a patch and a test message that triggers
this bug (remember to configure your SquirrelMail
installation for UTF-8 charset before testing).
Patch for line-eating word wrap bug
Test message that has one line from its body eaten