summaryrefslogtreecommitdiff
path: root/src/lxml/html
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2014-12-14 07:42:26 +0100
committerStefan Behnel <stefan_ml@behnel.de>2014-12-14 07:42:26 +0100
commit31dc47a7d985ff1efe6f43938048af09cc0a1a79 (patch)
treec3285b0f43d1b6eb547fef2147ef02e382bec41f /src/lxml/html
parenta551a2347d0f25b7bda8c1598ae3a9173e06e8b5 (diff)
downloadpython-lxml-31dc47a7d985ff1efe6f43938048af09cc0a1a79.tar.gz
fix LP#1369362: do not try to remove pseudo-attributes from processing instructions in HTML cleaner
--HG-- extra : transplant_source : %FA%01c%AF%5E%13%95%25%1E%01%19%ADA%C6%2A%5D%12%C4n%5E
Diffstat (limited to 'src/lxml/html')
-rw-r--r--src/lxml/html/clean.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lxml/html/clean.py b/src/lxml/html/clean.py
index 8ce4f9be..bbec243a 100644
--- a/src/lxml/html/clean.py
+++ b/src/lxml/html/clean.py
@@ -257,7 +257,7 @@ class Cleaner(object):
kill_tags.add('script')
if self.safe_attrs_only:
safe_attrs = set(self.safe_attrs)
- for el in doc.iter():
+ for el in doc.iter(etree.Element):
attrib = el.attrib
for aname in attrib.keys():
if aname not in safe_attrs:
@@ -266,7 +266,7 @@ class Cleaner(object):
if not (self.safe_attrs_only and
self.safe_attrs == defs.safe_attrs):
# safe_attrs handles events attributes itself
- for el in doc.iter():
+ for el in doc.iter(etree.Element):
attrib = el.attrib
for aname in attrib.keys():
if aname.startswith('on'):