Compatibility fix for Python 2.6
(NamedNodeList seems not to have had the iterkeys method back then)
This commit is contained in:
parent
46a2ada361
commit
6254548582
1 changed files with 2 additions and 2 deletions
|
|
@ -2913,8 +2913,8 @@ def scourString(in_string, options=None):
|
|||
return False
|
||||
else:
|
||||
for element in doc.getElementsByTagName("*"):
|
||||
for attrName in six.iterkeys(element.attributes):
|
||||
if attrName.startswith(prefix):
|
||||
for attribute in element.attributes.values():
|
||||
if attribute.name.startswith(prefix):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue