2007-01-04 [colin] 2.6.1cvs105
[claws.git] / src / common / quoted-printable.c
index 1c10f2b4b4271d5c184ce1898107723f6ceddb88..2cebddad359e313b10fb974bb3904efe54f456e4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Sylpheed-Claws team
+ * Copyright (C) 1999-2007 Hiroyuki Yamamoto and the Claws Mail team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -90,6 +90,8 @@ gint qp_decode_line(gchar *str)
 
        while (*inp != '\0') {
                if (*inp == '=') {
+                       if (inp[1] && inp[2] && inp[1] == '0' && inp[2] == '0')
+                               inp += 3;
                        if (inp[1] && inp[2] &&
                            get_hex_value((guchar *)outp, inp[1], inp[2])
                            == TRUE) {
@@ -119,6 +121,8 @@ gint qp_decode_const(gchar *out, gint avail, const gchar *str)
 
        while (*inp != '\0' && avail > 0) {
                if (*inp == '=') {
+                       if (inp[1] && inp[2] && inp[1] == '0' && inp[2] == '0')
+                               inp += 3;
                        if (inp[1] && inp[2] &&
                            get_hex_value((guchar *)outp, inp[1], inp[2])
                            == TRUE) {
@@ -152,6 +156,8 @@ gint qp_decode_q_encoding(guchar *out, const gchar *in, gint inlen)
 
        while (inp - in < inlen && *inp != '\0') {
                if (*inp == '=' && inp + 3 - in <= inlen) {
+                       if (inp[1] == '0' && inp[2] == '0')
+                               inp += 3;
                        if (get_hex_value(outp, inp[1], inp[2]) == TRUE) {
                                inp += 3;
                        } else {