Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mailto links are broken since v.1.9.2 #75

Closed
simonhenke opened this issue Jul 13, 2023 · 1 comment
Closed

Mailto links are broken since v.1.9.2 #75

simonhenke opened this issue Jul 13, 2023 · 1 comment

Comments

@simonhenke
Copy link

Seems like some change in version 1.9.2 is causing the href of mailto:-links to be incorrectly parsed to "/".

<Link href="mailto:[email protected]">Contact</Link>
is being rendered as
<a href="/">Contact</a>

Possible workarounds:

  • downgrade to v.1.9.1
  • in Incorrect translation of external links #55 I already mentioned a workaround for fixing incorrectly translated external links, which is to have a custom link component rendering either the link component from next/link or from next-translate-routes/link based on the href. This could be extended to also exclude mailto: hrefs like:
    const Link = ["http","mailto:"].some(s => href.toString().startsWith(s)) ? NextLink : NextTranslateRoutesLink;
@cvolant
Copy link
Collaborator

cvolant commented Nov 29, 2023

I fixed it in prerelease 1.11.0-0. I will release it in 1.11.0 soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants