From: Rocco Rutte Date: Wed, 17 Jul 2002 12:48:38 +0000 (+0000) Subject: * Thomas Roessler [02-07-08 10:14:53 +0200] wrote: X-Git-Tag: mutt-1-5-2-rel~74 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=593c0ee030a24ec5fc808c12fc8ff5b04830a6d3;p=mutt * Thomas Roessler [02-07-08 10:14:53 +0200] wrote: > * sendlib.c, 3.12 -> 3.13 > From: Rocco Rutte > 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. --- diff --git a/sendlib.c b/sendlib.c index 58b67636..3ddb46f0 100644 --- 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] == '.') {