[Zope-CMF] some issues from the CMF Collector

Yuppie schubbe@web.de
Wed, 08 Jan 2003 18:32:20 +0100


Hi!

I chose some bugs from the collector to resolve the next weeks and like 
to have some feedback in advance:



CMFDefault.utils should work with XHTML
=======================================


<http://collector.zope.org/CMF/41>: CMFDefault.utils.bodyfinder
---------------------------------------------------------------

PROBLEM:
CMF 1.3 has a regression in bodyfinder: The body of xhtml-files starting 
with XML and DOCTYPE declarations can't be found by 'bodyfinder'.

REASON:
To fix <http://collector.zope.org/ColDev/74>
     _bodyre = re.compile(r'<body.*?>', re.DOTALL|re.I)
was changed to
     _bodyre = re.compile(r'^\s*<html.*<body.*?>', re.DOTALL|re.I)

PROPOSED SOLUTION (1):
Make the regex even more complex:
     _bodyre = re.compile( r'^(\s|(<[^<>]*?>))*<html.*<body.*?>',
                           re.DOTALL | re.I )

PROPOSED SOLUTION (2):
'bodyfinder' is only useful for html documents, it should only be used 
if we made sure we have a html document.

QUESTIONS:
Solution (1) is just a one line change, (2) seems to be cleaner but 
needs much more changes. Other ideas? Is there a way to make the regex 
in (1) less complex? Which solution should be implemented?


<http://collector.zope.org/CMF/108>: CMFDefault.utils.strippingParser
---------------------------------------------------------------------

PROBLEM:
When having tags like <br /> or <img src="" /> the trailing slash is 
stripped.

PROPOSED SOLUTION:
Use the patch attached to the bug report. This gives the values 1 and 0 
a new meaning. Parser will always add a trailing slash to tags like <br> 
and <img src="">.

QUESTION:
Any better ideas?



Buglets
=======

<http://collector.zope.org/CMF/80>,
<http://collector.zope.org/CMF/95>

Should be resolved as proposed.

<http://collector.zope.org/CMF/94>

The text on ZMI Tool tabs should be improved.

QUESTION:
Any Comments?



Non-bugs
========

<http://collector.zope.org/CMF/77>

I agree with the comments. This should be rejected.

<http://collector.zope.org/CMF/93>

Can't reproduce this. This should be rejected.

QUESTION:
Any Comments?



TIA,

Yuppie