diff roundup/mailgw.py @ 4581:f1d6e2b2eb64

Fix quote-stripping in mail gateway again. Keep non-quoted first line of quoted section only if it ends in ':'.
author Ralf Schlatterbeck <rsc@runtux.com>
date Thu, 05 Jan 2012 22:20:11 +0100
parents 782737d1a2d7
children 6e9b9743de89
line wrap: on
line diff
--- a/roundup/mailgw.py	Thu Jan 05 21:47:34 2012 +0100
+++ b/roundup/mailgw.py	Thu Jan 05 22:20:11 2012 +0100
@@ -1792,7 +1792,9 @@
         if quote_1st or quote_2nd:
             # don't drop non-quoted first line of intermediate section:
             if ns and not quote_1st and lines[0] and not keep_citations:
-                l.append(lines[0])
+                # we drop only first-lines ending in ':' (e.g. 'XXX wrote:')
+                if not lines[0].endswith(':'):
+                    l.append(lines[0])
             # see if there's a response somewhere inside this section (ie.
             # no blank line between quoted message and response)
             for n, line in enumerate(lines[1:]):

Roundup Issue Tracker: http://roundup-tracker.org/