Problem with format=flowed patch
I have been working on a fix for the problem of Mailman's dropping format=flowed from Content-Type: headers. There is a bug report and a patch at <https://sourceforge.net/tracker/?func=detail&atid=100103&aid=1495122&group_id=103>.
The patch to Scrubber.py has just been revised (revised patch is attached to the above tracker item).
Scrubber would throw an exception when processing a message with no text/plain part. If you are using a prior version of this patch, please get the current version to avoid this problem.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi Mark,
I was working this patch on the trunk.
I think the indent level of this part in Scrubber.py should be
if charset is None:
charset = part.get_content_charset(lcset)
format = part.get_param('format')
delsp = part.get_param('delsp')
Sorry if I misunderstand.
Mark Sapiro wrote:
I have been working on a fix for the problem of Mailman's dropping format=flowed from Content-Type: headers. There is a bug report and a patch at <https://sourceforge.net/tracker/?func=detail&atid=100103&aid=1495122&group_id=103>.
The patch to Scrubber.py has just been revised (revised patch is attached to the above tracker item).
Scrubber would throw an exception when processing a message with no text/plain part. If you are using a prior version of this patch, please get the current version to avoid this problem.
-- Tokio Kikuchi, tkikuchi@is.kochi-u.ac.jp http://weather.is.kochi-u.ac.jp/
Tokio Kikuchi wrote:
I think the indent level of this part in Scrubber.py should be
if charset is None: charset = part.get_content_charset(lcset)
format = part.get_param('format')
delsp = part.get_param('delsp')
Tokio,
Thanks for looking at this.
I don't think your suggestion is correct. What I am trying to do is get the format= and delsp= parameters from only the first text/plain part in the message. Often, this will be the only part in which case it doesn't matter.
Consider however a message with a format=flowed text/plain 'body' and a subsequent attached text/plain part perhaps without format=flowed. We want to remember the format parameter from the first 'body' part and not override it from the second text/plain part.
I recognize that there can always be a pathological case where it might be more appropriate to get the parameters from a subsequent part, but I think in general, the first text/plain part is the safest.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark Sapiro wrote:
I don't think your suggestion is correct. What I am trying to do is get the format= and delsp= parameters from only the first text/plain part in the message. Often, this will be the only part in which case it doesn't matter.
Sorry that I misunderstood. It was a little bit too early in the morning to start working. ;-) (6AM Japan)
I've almost done with this 'format=flowed' patch and others for Scrubber.py and Decorate.py for the trunk. I'll commit them after adding some more test codes.
-- Tokio Kikuchi, tkikuchi@is.kochi-u.ac.jp http://weather.is.kochi-u.ac.jp/
participants (2)
-
Mark Sapiro
-
Tokio Kikuchi