mailto: and tel: links are converted to plain text

Aperta
#2,644 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@patrick-5546 ci sta già lavorando.

Dal 6/10/2026.

  • #2645 di @patrick-5546 — aperta
  • #2648 di @iosayin — aperta
  • #2696 di @udbhav-shrinet — aperta
  • #2736 di @OUAO-FRANK — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Start at _CustomMarkdownify.convert_a (the HTML converter in markitdown) to see where the scheme allow-list of http/https/file is enforced, and check the DOCX hyperlink path that feeds the same code. The issue includes a reproduction script whose expected output is Contact [the team](mailto:[email protected])., and tests would live alongside the existing HTML/DOCX converter tests. Done means mailto: and tel: hrefs survive as Markdown links while javascript: still reduces to plain text — but note three pull requests (#2645, #2648, #2661) are already open against this issue, so the work is under way and a newcomer should coordinate first.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

_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:[email protected]">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:[email protected]).'

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.

Lingua principale
Python
Stelle
198k
Fork
15k
Merge medio
2h 16m
PR unite (30g)
9

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/markitdown

Tutte le issue di microsoft/markitdown

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.