[CMF-checkins] CVS: Products/CMFCore - FSPageTemplate.py:1.31

Jens Vagelpohl jens at dataflake.org
Mon Mar 7 06:40:50 EST 2005


Update of /cvs-repository/Products/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv12350/CMFCore

Modified Files:
	FSPageTemplate.py 
Log Message:
- fixing the fix


=== Products/CMFCore/FSPageTemplate.py 1.30 => 1.31 ===
--- Products/CMFCore/FSPageTemplate.py:1.30	Mon Mar  7 06:29:37 2005
+++ Products/CMFCore/FSPageTemplate.py	Mon Mar  7 06:40:49 2005
@@ -86,8 +86,12 @@
 
         if reparse:
             # If we already have a content_type set it must come from a
-            # .metadata file and we should always honor that
-            if getattr(self, 'content_type', None) is None:
+            # .metadata file and we should always honor that. The content
+            # type is initialized as text/html by default, so we only
+            # attempt further detection if the default is encountered.
+            # One previous misbehavior remains: It is not possible to
+            # force a text./html type if parsing detects it as XML.
+            if getattr(self, 'content_type', 'text/html') == 'text/html':
                 xml_info = xml_detect_re.match(data)
                 if xml_info:
                     # Smells like xml



More information about the CMF-checkins mailing list