summaryrefslogtreecommitdiff
path: root/mammoth
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-09-26 22:50:02 +0100
committerMichael Williamson <mike@zwobble.org>2026-09-26 22:50:02 +0100
commit8dd0ce0b69e3987c0b2282bdf1cb2e9f6abaf57d (patch)
tree31be4541a78834deda4c0e6df7f386eb1ece9935 /mammoth
parent2a5cf02b98fe7d20ba7af5395f0af1f22e2c4210 (diff)
Escape markdown link hrefs
Diffstat (limited to 'mammoth')
-rw-r--r--mammoth/writers/markdown.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mammoth/writers/markdown.py b/mammoth/writers/markdown.py
index c78fd3f..5c69876 100644
--- a/mammoth/writers/markdown.py
+++ b/mammoth/writers/markdown.py
@@ -61,7 +61,7 @@ def _hyperlink(attributes, markdown_state):
href = attributes.get("href", "")
if href:
return _WriterOutput(
- "[", "]({0})".format(href),
+ "[", "]({0})".format(_escape_markdown(href)),
anchor_position="before",
)
else: