Commit 87da5df6 authored by Nicolas Delaby's avatar Nicolas Delaby

Improve regex to detect charset

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39355 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f98f0303
......@@ -122,7 +122,8 @@ def decode_htmlentity(m):
except ValueError:
return entity_value
charset_parser = re.compile('charset="?(?P<charset>[^"]*)"?$')
charset_parser = re.compile('charset="?(?P<charset>[^"]*)"?[\S/]?',
re.IGNORECASE)
class CharsetReplacer:
def __init__(self, encoding):
self.encoding = encoding
......
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