1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-09-24 11:28:23 +02:00

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
el = self.context.pop()
if el in self.skip:
self.skip.remove(el)
if el.tag not in ["script", "style", "object"]:
self.skip.remove(el)
return
# Render closing tag if kept

View File

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