Signature separator improper parsing ruins proper body creation.
j0rd - June 17, 2009 - 10:38
| Project: | Mailhandler |
| Version: | HEAD |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
By default signature separator is set to "--"
I was having problems with mailhandler properly creating my node's body from an email.
The email looked like this
Title One!
------------------------------------------------------------------------
Paragraph Ones. Paragraph Ones. Paragraph Ones. Paragraph Ones.
Paragraph Ones. Paragraph Ones. Paragraph Ones. Paragraph Ones.
Paragraph Ones. Paragraph Ones. Paragraph Ones. Paragraph Ones.
Title Two!
--------------------------------------------------------------------------
Paragraph Two. Paragraph Two. Paragraph Two. Paragraph Two.
Paragraph Two. Paragraph Two. Paragraph Two. Paragraph Two. Paragraph Two.
Paragraph Two. Paragraph Two. Paragraph Two. Paragraph Two. The body of my node was turning out as
Title One!Took me a while to figure out, this was because sig separator was matching on "----------------...." and cutting it off. Not sure if this is desired, or if sig separator should only match on /^--$/ and not /--/.
I personally would prefer a hard match on /^--$/ as I'd rather have a couple extra signatures added instead of having some bodies truncated.
Temporary Fix
Simply set signature separator to "" to disable it running.

#1
I will accept a patch to swap the current signature match, with a regular expression match, thus allowing for it to be exact.
Note: please verify with mail2web and/or other module which depend on mailhandler, that this doesn't conflict with their operation.