Fixed search plugin not removing subsequent script and style tags

This commit is contained in:
squidfunk 2023-03-14 11:22:05 +01:00
parent cd73ef1573
commit 2c7b0a3fc1
2 changed files with 4 additions and 2 deletions

View File

@ -432,7 +432,8 @@ class Parser(HTMLParser):
# Remove element from skip list # Remove element from skip list
el = self.context.pop() el = self.context.pop()
if el in self.skip: if el in self.skip:
self.skip.remove(el) if el.tag not in ["script", "style", "object"]:
self.skip.remove(el)
return return
# Render closing tag if kept # Render closing tag if kept

View File

@ -432,7 +432,8 @@ class Parser(HTMLParser):
# Remove element from skip list # Remove element from skip list
el = self.context.pop() el = self.context.pop()
if el in self.skip: if el in self.skip:
self.skip.remove(el) if el.tag not in ["script", "style", "object"]:
self.skip.remove(el)
return return
# Render closing tag if kept # Render closing tag if kept