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

Link escapes # character when passing in href #1439

Closed
3 tasks done
MHMDHIDR opened this issue Oct 22, 2024 · 2 comments · Fixed by #1448
Closed
3 tasks done

Link escapes # character when passing in href #1439

MHMDHIDR opened this issue Oct 22, 2024 · 2 comments · Fixed by #1448
Labels
bug Something isn't working unconfirmed Needs triage.

Comments

@MHMDHIDR
Copy link

Description

When passing # to href for example:

View Projects

it comes out like this:

View Projects

in the previous API:
import { createSharedPathnamesNavigation } from 'next-intl/navigation'

The Link component was working as expected, but with the new API:
import { createNavigation } from 'next-intl/navigation'

it is producing the issue that.

Please try to fix the issue in the upcoming version.

Verifications

  • I've verified that the problem I'm experiencing isn't covered in the docs.
  • I've searched for similar, existing issues on GitHub and Stack Overflow.
  • I've compared my app to a working example to look for differences.

Mandatory reproduction URL

https://technodevlabs-q09zvgtxw-mhmdhidr-team.vercel.app

Reproduction description

Steps to reproduce:

  1. Open reproduction
    using the new import { createNavigation } from 'next-intl/navigation'.

  2. Then exporting Link using: export const { Link, redirect, usePathname, useRouter } = createNavigation(routing).

  3. See error: it escapes the # in the href property.

Expected behaviour

Not to escape # symbol in the href property.

@MHMDHIDR MHMDHIDR added bug Something isn't working unconfirmed Needs triage. labels Oct 22, 2024
@service-paradis

This comment was marked as off-topic.

@amannn
Copy link
Owner

amannn commented Oct 22, 2024

Thanks for the prompt report! A fix is coming up in #1448.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unconfirmed Needs triage.
Projects
None yet
3 participants