[Zope-Checkins] SVN: Zope/branches/2.10/ - LP/#324876: tighened regex for detecting the charset
Andreas Jung
andreas at andreas-jung.com
Wed Feb 4 06:04:50 EST 2009
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):
More information about the Zope-Checkins
mailing list