1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-27 17:00:54 +01:00

Fixed encoding of boolean attributes in privacy plugin

This commit is contained in:
squidfunk 2024-10-16 14:09:40 +02:00
parent e2c621f1d9
commit cc1508f1dc
No known key found for this signature in database
GPG Key ID: 5ED40BC4F9C436DF
2 changed files with 2 additions and 2 deletions

View File

@ -336,7 +336,7 @@ class PrivacyPlugin(BasePlugin[PrivacyConfig]):
# Return void or opening tag as string, strip closing tag
data = tostring(el, encoding = "unicode")
return data.replace(" />", ">").replace(f"\"{temp}\"", "")
return data.replace(" />", ">").replace(f"=\"{temp}\"", "")
# Enqueue external asset for download, if not already done
def _queue(self, url: URL, config: MkDocsConfig, concurrent = False):

View File

@ -336,7 +336,7 @@ class PrivacyPlugin(BasePlugin[PrivacyConfig]):
# Return void or opening tag as string, strip closing tag
data = tostring(el, encoding = "unicode")
return data.replace(" />", ">").replace(f"\"{temp}\"", "")
return data.replace(" />", ">").replace(f"=\"{temp}\"", "")
# Enqueue external asset for download, if not already done
def _queue(self, url: URL, config: MkDocsConfig, concurrent = False):