* remove =\n and friends instead of replacing it.
authorWilfried Göesgens <willi@citadel.org>
Mon, 5 Feb 2007 21:17:50 +0000 (21:17 +0000)
committerWilfried Göesgens <willi@citadel.org>
Mon, 5 Feb 2007 21:17:50 +0000 (21:17 +0000)
citadel/mime_parser.c

index a543c688ace709e3bd04bc6d52f317a80990f093..deb06aeed7dda580b8ebe9a561c89e278f4e133d 100644 (file)
@@ -62,6 +62,7 @@ char *fixed_partnum(char *supplied_partnum) {
 
 /*
  * Convert "quoted-printable" to binary.  Returns number of bytes decoded.
+ * according to RFC2045 section 6.7
  */
 int CtdlDecodeQuotedPrintable(char *decoded, char *encoded, int sourcelen) {
        unsigned int ch;
@@ -82,8 +83,8 @@ int CtdlDecodeQuotedPrintable(char *decoded, char *encoded, int sourcelen) {
                            (*check == '\n') ||  
                            (*check == '\r'))
                        {
-                               decoded[destpos - 1] = '\r';
-                               decoded[destpos] = '\n';                                
+                               decoded[destpos - 1] = '\0';
+                               destpos-=2;
                        }
                        else if (sourcelen - sourcepos > 2)
                        {