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

"#" in query value redirect to homepage #74

Closed
gsambrotta opened this issue Jun 1, 2021 · 2 comments
Closed

"#" in query value redirect to homepage #74

gsambrotta opened this issue Jun 1, 2021 · 2 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@gsambrotta
Copy link
Collaborator

Describe the bug
When a search is done with a "#" symbol in it, the query fail or it gets redirect to the homepage.

To Reproduce
Steps to reproduce the behavior:

  1. go to homepage and search for "C#"
  2. you will see that the search is not done and we stay on the homepage

Expected behavior
I would expect the search to bring me to the search page results with the results for "C#"

Additional context
The "#" is intepreted as anchor in the url.
In this way the application doesn't find the type anymore which is mandatory to sucessfully land on the search page.
Check search.tsx line 435 ca.

@gsambrotta gsambrotta added bug Something isn't working good first issue Good for newcomers labels Jun 1, 2021
@mintbomb27
Copy link
Contributor

Hey @gsambrotta !

I found a similar issue while using "&" as well when the rest of the query disappears. I guess encoding the search query using encodeURIComponent() before searching it would be an apt solution in this case? I can either implement it in place of queryNoWitheSpace() or I can create a new function. What would you recommend?

mintbomb27 added a commit to mintbomb27/elliotforwater.com that referenced this issue Sep 3, 2021
@gsambrotta
Copy link
Collaborator Author

Thank you @mintbomb27 , I'm not sure why I didn't get the notification of your comment. But thank you for taking action and just open a PR! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants