From 8627676ce1cbb573ecc799141c35f302cbc20af9 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 5 Dec 2026 19:38:49 +0000 Subject: Escape HTML tag and entity characters in Markdown writer --- mammoth/writers/markdown.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mammoth') diff --git a/mammoth/writers/markdown.py b/mammoth/writers/markdown.py index 79779de..5429cc2 100644 --- a/mammoth/writers/markdown.py +++ b/mammoth/writers/markdown.py @@ -204,4 +204,4 @@ class MarkdownWriter(Writer): def _escape_markdown(value): - return re.sub(r"([\`\*_\{\}\[\]\(\)\#\+\-\.\!])", r"\\\1", re.sub("\\\\", "\\\\\\\\", value)) + return re.sub(r"([\`\*_\{\}\[\]\(\)\#\+\-\.\!<>&])", r"\\\1", re.sub("\\\\", "\\\\\\\\", value)) -- cgit v1.2.3