saberland/saber

Email link gets parsed as relative link #485

andreasvirkus posted onGitHub

<!-- Please don't delete this template or we'll close your issue -->

<!-- Before creating an issue please make sure you are using the latest version of Saber. -->

<!-- Issues which contain questions or support requests will be closed. -->

<!-- Please ask questions via following several ways. -->

<!-- https://chat.saber.land/ -->

<!-- https://stackoverflow.com/questions/ask?tags=saberjs -->

Bug report

Steps to reproduce

Insert a mailto: link in a markdown file, e.g.

Send me an [e-mail](mailto:some@email.com)

Repl: https://codesandbox.io/s/saber-email-link-qb07d

What is expected?

The rendered HTML link should be

Send me an <a href="mailto:some@email.com">e-mail</a>

What is actually happening?

The root domain is added before the link

Send me an <a href="https://current-domain.com/mailto:some@email.com">e-mail</a>

Other relevant information

  • Result of running saber -v: 0.9.1
  • Does this issue occur when all plugins are disabled? Yes

This was fixed during a refactor, will be available in next release soon.

posted by egoist over 5 years ago

Fixed in v0.10.0

posted by egoist over 5 years ago

or just use [e-mail](mailto://some@email.com)

posted by gaoryrt over 5 years ago

@gaoryrt any reference that that is valid html?

posted by andreasvirkus over 5 years ago

It just opens a new email window sent to //some@email.com, the double slash (//) won't be considered as a relative link, which lead to this bug.

posted by gaoryrt over 5 years ago

Okay, thanks. I wouldn't bet my money on all e-mail clients parsing that correctly though.

posted by andreasvirkus over 5 years ago

Fund this Issue

$0.00
Funded

Pull requests