Merge pull request #17 from Ede123/compat_fix

Compatibility fix for Python 2.6
This commit is contained in:
Tobias Oberstein 2015-11-26 22:56:48 +01:00
commit ebccae8cad

View file

@ -2913,8 +2913,8 @@ def scourString(in_string, options=None):
return False return False
else: else:
for element in doc.getElementsByTagName("*"): for element in doc.getElementsByTagName("*"):
for attrName in six.iterkeys(element.attributes): for attribute in element.attributes.values():
if attrName.startswith(prefix): if attribute.name.startswith(prefix):
return False return False
return True return True