Skip to content

Commit

Permalink
Fixed encoding of boolean attributes in privacy plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
squidfunk committed Oct 16, 2024
1 parent e2c621f commit cc1508f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion material/plugins/privacy/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def _print(self, el: Element):

# 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):
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/privacy/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def _print(self, el: Element):

# 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):
Expand Down

0 comments on commit cc1508f

Please sign in to comment.