[Coco] To Dennis: Message formatting issues with Mailman Archiver
Torsten Dittel
OS-9 at TRS-80.CC
Mon May 26 10:16:59 EDT 2014
Bad enough http://news.gmane.org/gmane.comp.hardware.tandy.coco is still
not working (it stopped archiving the messages a week ago), so I have to
open a new thread each time I post:
Dennis,
could it be the following Class Variables in Mailman/Archiver/HyperArch.py
have been changed when you updated Mailman which now causes messages
staying unwrapped:
class HyperArchive(pipermail.T):
# [...]
# some defaults
# [...]
ALLOWHTML = 0 # "Lines between <html></html>" handled as is.
SHOWHTML = 1 # Eg, nuke leading whitespace in html manner.
IQUOTES = 1 # Italicize quoted text.
SHOWBR = 1 # Add <br> onto every line
The above setting is what I assume had been active before the update, at
least if I look at this (maybe outdated) code:
def format_article(self, article):
# called from add_article
# TBD: Why do the HTML formatting here and keep it in the
# pipermail database? It makes more sense to do the html
# formatting as the article is being written as html and toss
# the data after it has been written to the archive file.
lines = filter(None, article.body)
# Handle <HTML> </HTML> directives
if self.ALLOWHTML:
self.__processbody_HTML(lines)
self.__processbody_URLquote(lines)
if not self.SHOWHTML and lines:
lines.insert(0, '<PRE>')
lines.append('</PRE>')
else:
# Do fancy formatting here
if self.SHOWBR:
lines = map(lambda x:x + "<BR>", lines)
else:
for i in range(0, len(lines)):
s = lines[i]
if s[0:1] in ' \t\n':
lines[i] = '<P>' + s
article.html_body = lines
return article
Regards,
Torsten
More information about the Coco
mailing list