From fcb47afe59cd419e018cbd668eecadb09a33d83b Mon Sep 17 00:00:00 2001 From: "bienvenu%nventure.com" Date: Thu, 15 Feb 2007 23:30:04 +0000 Subject: [PATCH] eat soft linebreaks in quoted printable text, sr=mscott 268459 git-svn-id: svn://10.0.0.236/trunk@220347 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mailnews/base/util/nsMsgUtils.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/mozilla/mailnews/base/util/nsMsgUtils.cpp b/mozilla/mailnews/base/util/nsMsgUtils.cpp index 3ebc6bb091e..5912f0843c8 100644 --- a/mozilla/mailnews/base/util/nsMsgUtils.cpp +++ b/mozilla/mailnews/base/util/nsMsgUtils.cpp @@ -1507,11 +1507,22 @@ NS_MSG_BASE void MsgStripQuotedPrintable (unsigned char *src) else { // first char after '=' isn't hex. check if it's a normal char - // or a soft line break. + // or a soft line break. If it's a soft line break, eat the + // CR/LF/CRLF. if (src[srcIdx + 1] == nsCRT::CR || src[srcIdx + 1] == nsCRT::LF) + { srcIdx++; // soft line break, ignore the '='; + if (src[srcIdx] == nsCRT::CR || src[srcIdx] == nsCRT::LF) + { + srcIdx++; + if (src[srcIdx] == nsCRT::LF) + srcIdx++; + } + } else // normal char, copy it. + { dest[destIdx++] = src[srcIdx++]; // aka token[0] + } continue; }