_CustomMarkdownify.convert_a keeps only http, https and file links, and reduces any other scheme to the link text. Dropping javascript: links makes sense, but e-mail and phone links are common in documents and can't run code.
import io
from markitdown import MarkItDown
html = b'<p>Contact <a href="mailto:team@example.com">the team</a>.</p>'
print(repr(MarkItDown().convert_stream(io.BytesIO(html), file_extension=".html").markdown))
Actual: 'Contact the team.'
Expected: 'Contact [the team](mailto:team@example.com).'
The attached DOCX has the same link as a Word hyperlink and gives the same result. tel: links are dropped the same way.
markitdown-mailto-link.docx
Environment: markitdown 0.1.8 (main 4cc9fa1), Python 3.14.8, Ubuntu 24.04.5 LTS.
_CustomMarkdownify.convert_akeeps only http, https and file links, and reduces any other scheme to the link text. Droppingjavascript:links makes sense, but e-mail and phone links are common in documents and can't run code.Actual:
'Contact the team.'Expected:
'Contact [the team](mailto:team@example.com).'The attached DOCX has the same link as a Word hyperlink and gives the same result.
tel:links are dropped the same way.markitdown-mailto-link.docx
Environment: markitdown 0.1.8 (main 4cc9fa1), Python 3.14.8, Ubuntu 24.04.5 LTS.