On Dec 4, 2007 9:15 AM, Benji York <[EMAIL PROTECTED]> wrote:
> Also, does case matter here? Perhaps a .lower() should be added as well.
The major/minor type and the parameter names should be treated as case
insensitive.
There's a content-type parser in zope.publisher.contentype that should
hand
Thomas Lotze wrote:
Wouldn't a check like
if content_type.split(';', 1)[0] in ('text/html', 'text/xml'):
...
be more appropriate?
Probably. Remember, zc.resourcelibrary's HTML injection code is a hack
-- a necessary hack, but a hack none the less. I can say that because I
did it.
I found some behaviour of zc.resourcelib which I'm not sure is intended
that way: The lib takes care to apply only to HTML and XML content, so it
tests whether the content type (if set) is among text/html and text/xml:
if content_type == 'text/html' or content_type == 'text/xml':
...
Howe