Skip to content

Commit cc1508f

Browse files
committed
Fixed encoding of boolean attributes in privacy plugin
1 parent e2c621f commit cc1508f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: material/plugins/privacy/plugin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ def _print(self, el: Element):
336336

337337
# Return void or opening tag as string, strip closing tag
338338
data = tostring(el, encoding = "unicode")
339-
return data.replace(" />", ">").replace(f"\"{temp}\"", "")
339+
return data.replace(" />", ">").replace(f"=\"{temp}\"", "")
340340

341341
# Enqueue external asset for download, if not already done
342342
def _queue(self, url: URL, config: MkDocsConfig, concurrent = False):

Diff for: src/plugins/privacy/plugin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ def _print(self, el: Element):
336336

337337
# Return void or opening tag as string, strip closing tag
338338
data = tostring(el, encoding = "unicode")
339-
return data.replace(" />", ">").replace(f"\"{temp}\"", "")
339+
return data.replace(" />", ">").replace(f"=\"{temp}\"", "")
340340

341341
# Enqueue external asset for download, if not already done
342342
def _queue(self, url: URL, config: MkDocsConfig, concurrent = False):

0 commit comments

Comments
 (0)