From cc1508f1dc58ad56b71e769b9033acd3ff63f02a Mon Sep 17 00:00:00 2001 From: squidfunk Date: Wed, 16 Oct 2024 14:09:40 +0200 Subject: [PATCH] Fixed encoding of boolean attributes in privacy plugin --- material/plugins/privacy/plugin.py | 2 +- src/plugins/privacy/plugin.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/material/plugins/privacy/plugin.py b/material/plugins/privacy/plugin.py index 88f530b80..d99fa782e 100644 --- a/material/plugins/privacy/plugin.py +++ b/material/plugins/privacy/plugin.py @@ -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): diff --git a/src/plugins/privacy/plugin.py b/src/plugins/privacy/plugin.py index 88f530b80..d99fa782e 100644 --- a/src/plugins/privacy/plugin.py +++ b/src/plugins/privacy/plugin.py @@ -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):