-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Search results page fails to render if search string includes special characters #7618
Comments
@cdrini Hi, I just pushed a fix for this issue, do let me know if I missed out on anything! |
This is an issue with the library we're using to parse solr queries. I've created issues there:
Their community did in the past fix another issue I reported: jurismarches/luqum#79 . Maybe you could try to fix these issues on that repo @JaydenTeoh and open a PR? Using their commit jurismarches/luqum@0cc7767 as a template? In the meantime, we can try adding these to the escape flow. Currently all user-submitted queries pass through this function:
This function will try to parse the query, and if parsing errors, try to escape every character to convert the query to a plain solr string with no special features. This is done by this function: openlibrary/openlibrary/solr/query_utils.py Lines 120 to 140 in ed47d57
We likely want to expand this function to include the single quote. |
Evidence / Screenshot (if possible)
Relevant url?
https://openlibrary.org/search?q=Cornell+%2777%3A+The+Music%2C+the+Myth+and+the+Magnificence+of+the+Grateful+Dead+Show+at+Barton+Hall&mode=everything
Steps to Reproduce
Details
Proposal & Constraints
Related files
Stakeholders
The text was updated successfully, but these errors were encountered: