[Mailman-Users] msg_footer and standard message signature question
mark at msapiro.net
Mon Oct 27 18:29:38 CET 2008
Daniel Novotny wrote:
>we have stumbled upon a problem, that in msg_footer,
>Mailman discards the space at the end of the signature delimiter "-- ",
>which should be two dashes and space,
>according to http://www.guckes.net/mail/sig.etiquette.html#sigdashes
>the code (Mailman/Handlers/Decorate.py) says
> text = re.sub(r' *\r?\n', r'\n', template % d)
>so all the spaces before newline are eaten by the regex:
>is there any specific reason to strip the spaces?
>The previous version of mailman just changed \r\n to \n ...
>We want to correct the signature problem, but we don't want any
Yes. We strip the spaces because we now preserve format=flowed in the
Content-Type: header, but we don't want to flow the footer. But, we
went too far in stripping the space from a signature leadin.
Change the "text =" line above to
text = re.sub(r'(?m)(?<!^--) +(?=\n)', '',
re.sub(r'\r\n', r'\n', template % d))
This fix has been committed for the next release.
Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the Mailman-Users