diff options
| author | Michael Williamson <mike@zwobble.org> | 2026-09-26 22:52:30 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2026-09-26 22:52:30 +0100 |
| commit | 2c722f1d1f3cb4b45174c73f1193278720b0847a (patch) | |
| tree | df2690a6dcbe87e7243aa110534f82633f0896a5 /mammoth/writers/markdown.py | |
| parent | 8dd0ce0b69e3987c0b2282bdf1cb2e9f6abaf57d (diff) | |
Escape markdown image alt text and src
Diffstat (limited to 'mammoth/writers/markdown.py')
| -rw-r--r-- | mammoth/writers/markdown.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mammoth/writers/markdown.py b/mammoth/writers/markdown.py index 5c69876..79779de 100644 --- a/mammoth/writers/markdown.py +++ b/mammoth/writers/markdown.py @@ -72,7 +72,7 @@ def _image(attributes, markdown_state): src = attributes.get("src", "") alt_text = attributes.get("alt", "") if src or alt_text: - return _WriterOutput("".format(alt_text, src), "") + return _WriterOutput("".format(_escape_markdown(alt_text), _escape_markdown(src)), "") else: return _default_output |
