[CMF-checkins] CVS: CMF/CMFDefault - utils.py:1.8
Jeffrey P Shell
jeffrey@zope.com
Mon, 13 Aug 2001 17:08:00 -0400
Update of /cvs-repository/CMF/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv2587
Modified Files:
utils.py
Log Message:
Now, bodyfinder returns the full text of what was passed in if the
<body> searches fail (body searches might fail if the text was
something contained in an older CMF Document, for example)
=== CMF/CMFDefault/utils.py 1.7 => 1.8 ===
def bodyfinder(text):
bod = _bodyre.search(text)
- if not bod: return ''
+ if not bod: return text
end = _endbodyre.search(text)
- if not end: return ''
+ if not end: return text
else: return text[bod.end():end.start()]
htfinder = re.compile(r'<html', re.DOTALL|re.I)