[Mailman-Developers] Re: [Mailman-Users] Adding exception to
html-stripping in the archive
Laurence Berland
laurence@digitalpulp.com
Wed, 31 Jul 2002 16:06:41 -0400
begin quote from Laurence Berland on Wednesday 31 July 2002 12:04 pm
> I've already written code that filters the messages on their way to the
> archiver, substituting based on regular expressions. It does this in t=
he
> Queue/ArchRunner.py file, in just about the last spot before the actual
> archiver gets called. It can't go in the archiver, because it needs to=
be
> able to read the mlist variable for configuration and such. I need to =
be
> able to use a regular expression to substitute in a snippet of html cod=
e.
> This could be used for several things, but my intention is to use it to=
add
> an img tag. Is there a way to configurably get around the html-sanitiz=
ing
> done by the archiver in some non-kludge way?
I'm not sure if anyone is reading these, though I tend to suspect not. In any
case, I've found the kludge way to go about doing this, but it's really quite
awful. I changed the websafe function in utils.py to just return the very
string it is passed. Please tell me there's a better way, as this requires a
recompile to change, and it's not something I even want done for every list.
If there isn't a better way yet, can anyone think of how to code one? My
biggest problem is the lack of an mlist object near many websafe calls,
meaning I can't readily grab config variables for a list.
>
> TIA,
> Laurence
>