-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Closed
Milestone
Description
Bug report
Describe the bug
When passing some variables as query parameter, some chars get removed in router.query values.
Feks phonenumbers: +47111111111, then when getting the query.contact, the pluss is gone.
Is there a way for me to tap into this to get the pluss added?
I tried encoding before sending in, but + is not misunderstood.
I see the right value, with the +, in the asPath variable
To Reproduce
const Index = () => {
const router = useRouter()
const { contact } = router.query
const hasThePlussSign = router.asPath;
return (
<div>
{contact}
</div>
)
}
Expected behavior
Get the + sign included in the query value
System information
- OS: macOS
- Browser (if applies): chrome
- Version of Next.js: 9.1.4
Metadata
Metadata
Assignees
Labels
No labels