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

Fix Subjects or Publishers with "/" in name causing problems #5940

Merged
merged 2 commits into from
Dec 6, 2021

Conversation

hornc
Copy link
Collaborator

@hornc hornc commented Dec 6, 2021

Closes #333

This is a review response to #5939

The discussion on #333 has got way out of hand and seems to have lost focus since the original report from 2016.

The original report deals with the subject search page for the specific query:

https://openlibrary.org/search/subjects?q=business+economics&mode=everything

The two problem examples from the original report are the URLs:

Which have the link texts:

  • Business & Economics / Finance
  • Business & Economics / Management

The correct working destinations for these two are:

The ampersand does not appear to need encoding.
encoding the / to %2F (which #5939 does) also 404s: https://openlibrary.org/subjects/business_&_economics_%2F_management
so isn't correct.

Parenthesis in subjects from the subject page also don't appear to have a 404 problem:
Searching for https://openlibrary.org/search/subjects?q=Children%3A+Young+Adult the first two examples are:

I can't find any subjects with the other characters !./<>\\^|´™ in that PR, but having some examples that demonstrate a problem would be helpful before making any more code changes.

It looks like there are similar encoding problems in other parts of the code, which is why the discussion got over complicated.

I believe this fixes #333 , any other problems should be raised with clear examples showing a new issue.

Technical

Testing

Screenshot

Stakeholders

@cclauss cclauss added the Needs: Review This issue/PR needs to be reviewed in order to be closed or merged (see comments). [managed] label Dec 6, 2021
@mekarpeles
Copy link
Member

@jimchamp mentions wishing we had a generalized solution for this, but for now, looks like it addresses the issue

@mekarpeles mekarpeles merged commit a8ca15e into master Dec 6, 2021
@mekarpeles mekarpeles self-assigned this Dec 6, 2021
@mekarpeles mekarpeles removed the Needs: Review This issue/PR needs to be reviewed in order to be closed or merged (see comments). [managed] label Dec 6, 2021
@cdrini cdrini changed the title simple fix which closes #333 Fix Subjects or Publishers with "/" in name causing problems Dec 9, 2021
@cdrini cdrini deleted the simple333 branch December 22, 2021 00:37
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.

Subjects or Publishers with special characters in name cause problems
3 participants