]> granicus.if.org Git - neomutt/commitdiff
* Thomas Roessler [02-07-08 10:14:53 +0200] wrote:
authorRocco Rutte <s1118644@mail.inf.tu-dresden.de>
Wed, 17 Jul 2002 12:48:38 +0000 (12:48 +0000)
committerRocco Rutte <s1118644@mail.inf.tu-dresden.de>
Wed, 17 Jul 2002 12:48:38 +0000 (12:48 +0000)
>  * sendlib.c, 3.12 -> 3.13
>    From: Rocco Rutte <s1118644@mail.inf.tu-dresden.de>

>    Make encode_from a bit more aggressive, by also catching a 'f' in
>    the beginning of a line.

'Catch' is good but also to encode it is better. It may have
been too late (sorry for that) so I fixed it. I don't know
why the current source only escapes lines that actually
begin with 'from' or 'From' followed by some text. I think
that escaping 'from' or 'From' on a single line should be
done, too.

Not a big deal, anyways.

sendlib.c

index 58b676369de0af38c0b38188ffbf0c59686d3ec2..3ddb46f067a2394cb2de520535093959d4f7508f 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -148,11 +148,16 @@ static void encode_quoted (FGETCONV * fc, FILE *fout, int istext)
 
   while ((c = fgetconv (fc)) != EOF)
   {
-    /* Escape lines that begin with "the message separator". */
-    if (linelen == 5 && !mutt_strncmp ("From ", line, 5))
+    /* Escape lines that begin with/only contain "the message separator". */
+    if (linelen == 4 && !mutt_strncmp ("From", line, 4))
     {
-      strfcpy (line, "=46rom ", sizeof (line));
-      linelen = 7;
+      strfcpy (line, "=46rom", sizeof (line));
+      linelen = 6;
+    }
+    else if (linelen == 4 && !mutt_strncmp ("from", line, 4))
+    {
+      strfcpy (line, "=66rom", sizeof (line));
+      linelen = 6;
     }
     else if (linelen == 1 && line[0] == '.')
     {