Fix iteration bug while removing attributes
This commit is contained in:
@@ -87,6 +87,7 @@ class EMailNotification(BaseNotification):
|
|||||||
"border",
|
"border",
|
||||||
"cellpadding",
|
"cellpadding",
|
||||||
"cellspacing",
|
"cellspacing",
|
||||||
|
"class",
|
||||||
"color",
|
"color",
|
||||||
"colspan",
|
"colspan",
|
||||||
"dir",
|
"dir",
|
||||||
@@ -247,7 +248,7 @@ class EMailNotification(BaseNotification):
|
|||||||
|
|
||||||
# remove not whitelisted attributes
|
# remove not whitelisted attributes
|
||||||
for element in soup.find_all(True):
|
for element in soup.find_all(True):
|
||||||
for attribute in element.attrs.keys():
|
for attribute in list(element.attrs.keys()):
|
||||||
if attribute not in EMailNotification.good_attributes:
|
if attribute not in EMailNotification.good_attributes:
|
||||||
if element.name == "a" and attribute == "href":
|
if element.name == "a" and attribute == "href":
|
||||||
self.logger.debug(
|
self.logger.debug(
|
||||||
|
|||||||
Reference in New Issue
Block a user