Commit aae52915 authored by Nicolas Delaby's avatar Nicolas Delaby

Charset replacer should apply only on meta nodes.

Add condition to check that content attribute belong to meta tag
not another one.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36539 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 691e9541
......@@ -185,8 +185,8 @@ class StrippingParser(HTMLParser):
elif remove_script and hasScript(v):
if not self.raise_error: continue
else: raise IllegalHTML, 'Script URI "%s" not allowed.' % v
elif k.lower() == 'content' and self.default_encoding and\
self.default_encoding not in v:
elif tag.lower() == 'meta' and k.lower() == 'content' and\
self.default_encoding and self.default_encoding not in v:
match = charset_parser.search(v)
if match is not None:
self.original_charset = match.group('charset')
......
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