[Zope3-checkins] CVS: Zope3/lib/python/Zope/Publisher/Browser - BrowserResponse.py:1.8

Jim Fulton jim@zope.com
Wed, 4 Dec 2002 09:22:44 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/Publisher/Browser
In directory cvs.zope.org:/tmp/cvs-serv7872/lib/python/Zope/Publisher/Browser

Modified Files:
	BrowserResponse.py 
Log Message:
Fixed a bug in the DWIM HTML content type guessing code.


=== Zope3/lib/python/Zope/Publisher/Browser/BrowserResponse.py 1.7 => 1.8 ===
--- Zope3/lib/python/Zope/Publisher/Browser/BrowserResponse.py:1.7	Fri Nov  8 08:23:25 2002
+++ Zope3/lib/python/Zope/Publisher/Browser/BrowserResponse.py	Wed Dec  4 09:22:44 2002
@@ -61,7 +61,8 @@
 
     def __isHTML(self, str):
         s = str.strip().lower()
-        return s.startswith('<html>') or s.startswith('<!doctype html')
+        return ((s.startswith('<html') and (s[5:6] in ' >'))
+                 or s.startswith('<!doctype html'))
 
 
     def __wrapInHTML(self, title, content):