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[hmi-server]: incorrect parsing of some pdf urls #2851

Merged
merged 2 commits into from
Feb 28, 2024

Conversation

dvince2
Copy link
Collaborator

@dvince2 dvince2 commented Feb 28, 2024

We don't actually need to do a full encode here as most of the URLS given are coming from unpaywall and are good to go. What we mostly need to do is just replace whitespace with %20. This feels a little hacky to do but thats cowboy coding, baby! This works for random spot tests on PDFs as well as the previously problematic article with a DOI of 10.1101/2020.07.30.20164921

Resolves #2850

We don't actually need to do a full encode here as most of the URLS given are coming from unpaywall and are good to go. What we mostly need to do is just replace whitespace with `%20`. This feels a little hacky to do but thats cowboy coding, baby!
This works for random spot tests on PDFs as well as the previously problematic article with a DOI of 10.1101/2020.07.30.20164921
@dvince2 dvince2 requested a review from dgauldie as a code owner February 28, 2024 00:00
@dvince2 dvince2 linked an issue Feb 28, 2024 that may be closed by this pull request
@dvince2 dvince2 merged commit d1d2ba8 into main Feb 28, 2024
6 checks passed
@dvince2 dvince2 deleted the 2850-bugpdf-viewer-is-broken-for-unpaywall-articles branch February 28, 2024 14:50
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.

[BUG]PDF viewer is broken for unpaywall articles
2 participants