Commit 55241840 authored by Andreas Jung's avatar Andreas Jung

- LP/#324876: tighened regex for detecting the charset

  from a meta-equiv header
parent 19014866
...@@ -19,6 +19,9 @@ Zope Changes ...@@ -19,6 +19,9 @@ Zope Changes
Bugs fixed Bugs fixed
- LP/#324876: tighened regex for detecting the charset
from a meta-equiv header
- Acquisition wrappers now correctly proxy __iter__. - Acquisition wrappers now correctly proxy __iter__.
- Products.PluginIndexes.PathIndex: backported doc fixes / - Products.PluginIndexes.PathIndex: backported doc fixes /
......
...@@ -20,7 +20,7 @@ import re ...@@ -20,7 +20,7 @@ import re
xml_preamble_reg = re.compile(r'^<\?xml.*?encoding="(.*?)".*?\?>', re.M) 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) http_equiv_reg2 = re.compile(r'charset.*?=.*?(?P<charset>[\w\-]*)', re.I|re.M|re.S)
def encodingFromXMLPreamble(xml): def encodingFromXMLPreamble(xml):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment