aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/rfc822
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2014-10-07 01:03:36 -0700
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2014-10-07 01:03:36 -0700
commit5c95fccab85d182976558e634fd4edf6dd8a0834 (patch)
tree0618178e889f57e9afcd4d61b8848903d7222100 /src/core/rfc822
parentb12aa2f5e74f30ee39882fe3089fd557b630803f (diff)
Fixed #887: refactored to make use of stripWhitespace
Diffstat (limited to 'src/core/rfc822')
-rw-r--r--src/core/rfc822/MCMessageParser.cc9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/core/rfc822/MCMessageParser.cc b/src/core/rfc822/MCMessageParser.cc
index d5bf84e7..21e2e985 100644
--- a/src/core/rfc822/MCMessageParser.cc
+++ b/src/core/rfc822/MCMessageParser.cc
@@ -143,14 +143,7 @@ String * MessageParser::plainTextBodyRendering(bool stripWhitespace)
String * plainTextBodyString = html->flattenHTML();
if (stripWhitespace) {
- 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(" "))) {
- // do nothing.
- }
+ plainTextBodyString = plainTextBodyString->stripWhitespace();
}
return plainTextBodyString;
}