diff options
author | 2013-07-06 07:29:47 -0400 | |
---|---|---|
committer | 2013-07-06 07:29:47 -0400 | |
commit | aba67789f15b12aa17bb1386fca947a22462f946 (patch) | |
tree | b57a2a98d473ed3beca7d506381daadf63c83067 /src | |
parent | e7792ad0d839677410e4eecaf30095314d64f127 (diff) |
Ensuring that multiple space characters are reduced to a single space.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/imap/MCIMAPSession.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/imap/MCIMAPSession.cc b/src/core/imap/MCIMAPSession.cc index 0c68b537..7da3f435 100644 --- a/src/core/imap/MCIMAPSession.cc +++ b/src/core/imap/MCIMAPSession.cc @@ -3058,12 +3058,15 @@ String * IMAPSession::plainTextBodyRendering(IMAPMessage * message, String * fol String * htmlBodyString = htmlBodyRendering(message, folder); String * plainTextBodyString = htmlBodyString->flattenHTML(); - plainTextBodyString->replaceOccurrencesOfString(MCSTR(" "), MCSTR(" ")); plainTextBodyString->replaceOccurrencesOfString(MCSTR("\t"), MCSTR(" ")); plainTextBodyString->replaceOccurrencesOfString(MCSTR("\n"), MCSTR(" ")); plainTextBodyString->replaceOccurrencesOfString(MCSTR("\v"), MCSTR(" ")); plainTextBodyString->replaceOccurrencesOfString(MCSTR("\f"), MCSTR(" ")); plainTextBodyString->replaceOccurrencesOfString(MCSTR("\r"), MCSTR(" ")); + while (plainTextBodyString->replaceOccurrencesOfString(MCSTR(" "), MCSTR(" ")) > 0) { + /* do nothing */ + } + return plainTextBodyString; } |