`mailto`, `tel`, and data URIs considered broken
mwcz opened this issue · 3 comments
mwcz commented
It seems that hrefs beginning with mailto:
, tel:
, and data:
are flagged as broken, but only in documents from subdirectories.
./index.html
<a href="mailto:foo@email.com">Email me</a>
<a href="tel:+1-1234-1234">telephone</a>
<a href="data:text/plain;base64,SGVsbG8sIFdvcmxkIQ==">hello world</a>
<a href="/badlink">regular bad link</a>
./subdir/index.html
same content as ./index.html
Hyperlink reports /badlink
broken in both files, as expected. But the subdir/index.html also reports the mailto:
, tel:
, and data:
links as broken.
$ hyperlink .
Reading files
Checking 5 links from 2 files (2 documents)
./index.html
error: bad link /badlink
./subdir/index.html
error: bad link /badlink
error: bad link /subdir/data:text/plain;base64,SGVsbG8sIFdvcmxkIQ==
error: bad link /subdir/mailto:foo@email.com
error: bad link /subdir/tel:+1-1234-1234
Found 5 bad links
Edit: also fax:
and modem:
from https://www.ietf.org/rfc/rfc2806
mwcz commented
Btw, I'm happy to try putting together a PR to fix this if you like.
untitaker commented
are you sure that this is broken in master? I am fairly certain it works fine there.