-
Couldn't load subscription status.
- Fork 4
Fix bracket bug. #2648 #2649
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
Fix bracket bug. #2648 #2649
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When checking the organisations with parenthesis "Austrian Science Fund (fwf), Asutria" it keeps not returning anything:
https://deploy-preview-2649--fairsharing.netlify.app/search?page=1&organisations=austrian%2520science%2520fund%2520%28fwf%29%252C%2520austria
when there are three records linked to it as it can be seen here: https://deploy-preview-2649--fairsharing.netlify.app/organisations/154
The case of High performance computing works properly: https://deploy-preview-2649--fairsharing.netlify.app/search?userDefinedTags=high%2520performance%2520computing%2520%28hpc%29&page=1
Other organistion with parenthesis works https://deploy-preview-2649--fairsharing.netlify.app/search?organisations=european%2520union%2520%28eu%29&page=1 Is it possible that it fails as it has parenthesis and comma as your code does a split by comma?
Possibly. I can remove that but who knows what other weird issues may crop up later? |
….github.io into bracket_bug_2648
| // attempt to fix single fields with brackets, as per: | ||
| // https://github.com/FAIRsharing/fairsharing.github.io/issues/2648 | ||
| Object.keys(params).forEach((key) => { | ||
| if (String(params[key]).includes('(') || String(params[key]).includes(')')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If possible could you please try params[key] = [params[key]], instead of creating an array variable and pushing and assigning
….github.io into bracket_bug_2648
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All seems now to work properly
It's not clear why some strings aren't being quoted if they contain brackets, but I have written code to add them to an array if detected which can work around the problem.