Log message for revision 96070:
  - LP/#324876: tighened regex for detecting the charset
    from a meta-equiv header
  

Changed:
  U   Zope/branches/2.10/doc/CHANGES.txt
  U   Zope/branches/2.10/lib/python/Products/PageTemplates/utils.py

-=-
Modified: Zope/branches/2.10/doc/CHANGES.txt
===================================================================
--- Zope/branches/2.10/doc/CHANGES.txt  2009-02-04 10:57:45 UTC (rev 96069)
+++ Zope/branches/2.10/doc/CHANGES.txt  2009-02-04 11:04:49 UTC (rev 96070)
@@ -19,6 +19,9 @@
 
     Bugs fixed
 
+      - LP/#324876: tighened regex for detecting the charset
+        from a meta-equiv header
+
       - Acquisition wrappers now correctly proxy __iter__.
 
       - Products.PluginIndexes.PathIndex:  backported doc fixes /

Modified: Zope/branches/2.10/lib/python/Products/PageTemplates/utils.py
===================================================================
--- Zope/branches/2.10/lib/python/Products/PageTemplates/utils.py       
2009-02-04 10:57:45 UTC (rev 96069)
+++ Zope/branches/2.10/lib/python/Products/PageTemplates/utils.py       
2009-02-04 11:04:49 UTC (rev 96070)
@@ -20,7 +20,7 @@
 
 
 xml_preamble_reg = re.compile(r'^<\?xml.*?encoding="(.*?)".*?\?>', re.M)
-http_equiv_reg = re.compile(r'(<meta.*?http\-equiv.*?content-type.*?>)', 
re.I|re.M|re.S)
+http_equiv_reg = 
re.compile(r'(<meta\s+[^>]*?http\-equiv[^>]*?content-type.*?>)', re.I|re.M|re.S)
 http_equiv_reg2 = re.compile(r'charset.*?=.*?(?P<charset>[\w\-]*)', 
re.I|re.M|re.S)
 
 def encodingFromXMLPreamble(xml):

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to