Router query chops away chars
See original GitHub issueBug 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
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Router query chops away chars · Issue #10185
Bug report Describe the bug When passing some variables as query parameter, some chars get removed in router.query values.
Read more >JavaScript preserve query format using Next.js Router
How do I chop/slice/trim off last character in string using Javascript? 2261 · Get selected value in dropdown list using JavaScript · 1927....
Read more >Working with Query Strings in Blazor
In this post, I talk about query strings in Blazor. We start by understanding what they are and why we'd chose to use...
Read more >Ruby On Rails Tutorial: Controller and Parameters - 2020
The first are parameters that are sent as part of the URL, called query string parameters. The query string is everything after "?"...
Read more >addslashes - Manual - PHP
A use case of addslashes() is escaping the aforementioned characters in a ... is not the only special character that can break your...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Please try
next@canaryThis issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.