2006-06-20 [colin] 2.3.1cvs3
authorColin Leroy <colin@colino.net>
Tue, 20 Jun 2006 16:33:30 +0000 (16:33 +0000)
committerColin Leroy <colin@colino.net>
Tue, 20 Jun 2006 16:33:30 +0000 (16:33 +0000)
* src/news.c
* src/procheader.c
* src/unmime.c
Better fix for \n's in headers (don't
break Received: and others)

ChangeLog
PATCHSETS
configure.ac
src/news.c
src/procheader.c
src/unmime.c

index 08d1622d487658051389b80c7e292e4ea62f13a9..d0d2490495623a4f37de19139bdc44c8015dc7b7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-06-20 [colin]     2.3.1cvs3
+
+       * src/news.c
+       * src/procheader.c
+       * src/unmime.c
+               Better fix for \n's in headers (don't 
+               break Received: and others)
+
 2006-06-20 [paul]      2.3.1cvs2
 
        * src/alertpanel.c
index d5eaa4b69ed2b0415615fc7d174b304c4bd088bd..2d2034c4e7b3a862ddfd4a542b95ca7a91003c76 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.382.2.280 -r 1.382.2.281 src/compose.c;  ) > 2.3.0cvs26.patchset
 ( cvs diff -u -r 1.42.2.12 -r 1.42.2.13 NEWS;  cvs diff -u -r 1.8.2.12 -r 1.8.2.13 README;  cvs diff -u -r 1.654.2.1647 -r 1.654.2.1648 configure.ac;  ) > 2.3.1cvs1.patchset
 ( cvs diff -u -r 1.17.2.22 -r 1.17.2.23 src/alertpanel.c;  cvs diff -u -r 1.96.2.117 -r 1.96.2.118 src/textview.c;  ) > 2.3.1cvs2.patchset
+( cvs diff -u -r 1.101.2.25 -r 1.101.2.26 src/news.c;  cvs diff -u -r 1.47.2.31 -r 1.47.2.32 src/procheader.c;  cvs diff -u -r 1.8.2.9 -r 1.8.2.10 src/unmime.c;  ) > 2.3.1cvs3.patchset
index ace2b903ed0c2bf3812d3fae0d0f2b42e97ae121..993e39c66ed54140641a00eb1bb94128c855a339 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=3
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=2
+EXTRA_VERSION=3
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index da2766a88de0c852ea517a5a2cd95f88ee497d4b..fea653463835c85b4ec022a7071acf2ede06a1ea 100644 (file)
@@ -708,6 +708,10 @@ static MsgInfo *news_parse_xover(const gchar *xover_str)
 
         msginfo->subject = conv_unmime_header(subject, NULL);
 
+       remove_return(msginfo->from);
+       remove_return(msginfo->fromname);
+       remove_return(msginfo->subject);
+
         if (msgid) {
                 extract_parenthesis(msgid, '<', '>');
                 remove_space(msgid);
@@ -740,15 +744,6 @@ static MsgInfo *news_parse_xover(const gchar *xover_str)
                 }
         } 
 
-       /*
-       msginfo->xref = g_strdup(xref);
-       p = msginfo->xref+strlen(msginfo->xref) - 1;
-       while (*p == '\r' || *p == '\n') {
-               *p = '\0';
-               p--;
-       }
-       */
-
        return msginfo;
 }
 
index b2c951715ce9464146abdc27441658ded2047a7c..c01eaabf2d9a655cd8cd8c7a3464fde2c22fad31 100644 (file)
@@ -502,11 +502,12 @@ static MsgInfo *parse_stream(void *data, gboolean isstring, MsgFlags flags,
                        if (msginfo->from) break;
                         msginfo->from = conv_unmime_header(hp, NULL);
                        msginfo->fromname = procheader_get_fromname(msginfo->from);
-                       replace_returns(msginfo->from);
-                       replace_returns(msginfo->fromname);
+                       remove_return(msginfo->from);
+                       remove_return(msginfo->fromname);
                        break;
                case H_TO:
                         tmp = conv_unmime_header(hp, NULL);
+                       remove_return(tmp);
                        if (msginfo->to) {
                                p = msginfo->to;
                                msginfo->to =
@@ -518,6 +519,7 @@ static MsgInfo *parse_stream(void *data, gboolean isstring, MsgFlags flags,
                        break;
                case H_CC:
                         tmp = conv_unmime_header(hp, NULL);
+                       remove_return(tmp);
                        if (msginfo->cc) {
                                p = msginfo->cc;
                                msginfo->cc =
@@ -539,7 +541,7 @@ static MsgInfo *parse_stream(void *data, gboolean isstring, MsgFlags flags,
                case H_SUBJECT:
                        if (msginfo->subject) break;
                         msginfo->subject = conv_unmime_header(hp, NULL);
-                       replace_returns(msginfo->subject);
+                       remove_return(msginfo->subject);
                        break;
                case H_MSG_ID:
                        if (msginfo->msgid) break;
@@ -636,6 +638,7 @@ static MsgInfo *parse_stream(void *data, gboolean isstring, MsgFlags flags,
                case H_FROM_SPACE:
                        if (msginfo->fromspace) break;
                        msginfo->fromspace = g_strdup(hp);
+                       remove_return(msginfo->fromspace);
                        break;
                case H_LIST_POST:
                        msginfo->list_post = g_strdup(hp);
index e61818ee766ddd91567aa22b78ae452c0ce0093c..f20a83c14920d1c8811b41f26c8d3327b9c6fcc6 100644 (file)
@@ -132,14 +132,6 @@ gchar *unmime_header(const gchar *encoded_str)
        out_str = outbuf->str;
        out_len = outbuf->len;
        g_string_free(outbuf, FALSE);
-       if (out_str) {
-               while (strchr(out_str, '\n'))
-                       *strchr(out_str, '\n') = ' ';
-               while (strchr(out_str, '\r'))
-                       *strchr(out_str, '\r') = ' ';
-               while (strchr(out_str, '\t'))
-                       *strchr(out_str, '\t') = ' ';
-       }
 
        return g_realloc(out_str, out_len + 1);
 }