Skip to content

Issue 329 #338

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

Closed

Conversation

shubhendusaurabh
Copy link
Contributor

fixed #329 escape query text for searching

@birdofpreyru
Copy link
Collaborator

@shubhendusaurabh I don't like the points where you do encoding / decoding. I believe, the best point to encode is https://github.com/topcoder-platform/community-app/blob/develop/src/shared/reducers/challenge-listing/index.js#L168, and the best point to decode is https://github.com/topcoder-platform/community-app/blob/develop/src/shared/reducers/challenge-listing/index.js#L272 this way it will automatically work in all other code dealing with search by text. Please update and test

@shubhendusaurabh
Copy link
Contributor Author

@birdofpreyru Is the challenges page on latest develop branch broken? It was working yesterday.
filter
querydate

@twicoder
Copy link

@shubhendusaurabh I will fix it

@twicoder
Copy link

@birdofpreyru Please check PR #421 for the update of issue 212.

@birdofpreyru
Copy link
Collaborator

@shubhendusaurabh Sorry, will have to reject this and close the original issue. The problem was fixed by a change done elsewhere. The trick, actually, was in adding the proper option { encodeValuesOnly: true } here: https://github.com/topcoder-platform/community-app/blob/develop/src/shared/utils/url.js#L31

Before it was naively configured to not encode params written to query, which caused this problem (just leaving stringify with default options is also not that good, as it replaces square brackets [..] in filter elements, which makes it more difficult to understand the query).

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

Successfully merging this pull request may close these issues.

Clearing search and search using empty field won't remove the previous search term from the URL
3 participants