diff options
author | Vincent Richard <[email protected]> | 2010-02-10 09:12:25 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2010-02-10 09:12:25 +0000 |
commit | 5c2d078b4fe3b29d1c95d8131a44f5eefda3e953 (patch) | |
tree | 167c6f976172ef956df4e1cbbf776a0eae5cd675 | |
parent | Fixed compilation issue on Windows. (diff) | |
download | vmime-5c2d078b4fe3b29d1c95d8131a44f5eefda3e953.tar.gz vmime-5c2d078b4fe3b29d1c95d8131a44f5eefda3e953.zip |
Allow spaces to appear in mailbox display name without encoding or quoting. Encode or quote if CR or LF is present.
-rw-r--r-- | src/mailbox.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mailbox.cpp b/src/mailbox.cpp index f6df5165..036f003c 100644 --- a/src/mailbox.cpp +++ b/src/mailbox.cpp @@ -369,7 +369,7 @@ void mailbox::generate(utility::outputStream& os, const string::size_type maxLin // We have to encode the name: // - if it contains characters in a charset different from "US-ASCII", // - and/or if it contains one or more of these special chars: - // SPACE TAB " ; , < > ( ) @ / ? . = : + // CR LF TAB " ; , < > ( ) @ / ? . = : // Check whether there are words that are not "US-ASCII" // and/or contain the special chars. @@ -386,7 +386,8 @@ void mailbox::generate(utility::outputStream& os, const string::size_type maxLin { switch (*c) { - case ' ': + case '\r': + case '\n': case '\t': case ';': case ',': |