1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-02 00:25:10 -04:00

fixed MimeHeader.hasToBeEncoded() to include TAB.

bug encounted when replying to a message such as:
From: "bar,	foo" <foobar@example.com>
the field was originally folded on the tab, but the CRLF was already stripped before this error.
This commit is contained in:
ashley willis 2012-04-30 13:58:02 -05:00
parent 5d080b656d
commit 9e1fa63139

View File

@ -118,12 +118,12 @@ public class MimeHeader {
writer.flush();
}
// encode non printable characters except LF/CR codes.
// encode non printable characters except LF/CR/TAB codes.
public boolean hasToBeEncoded(String text) {
for (int i = 0; i < text.length(); i++) {
char c = text.charAt(i);
if (c < 0x20 || 0x7e < c) { // non printable
if (c != 0x0a && c != 0x0d) { // non LF/CR
if (c != 0x0a && c != 0x0d && c != 0x09) { // non LF/CR/TAB
return true;
}
}