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

Closes #2417: Fix double-encoded publication file URLs. #2430

Merged
merged 1 commit into from
May 24, 2023
Merged

Conversation

joeparsons
Copy link
Member

Description

Fixes issue with publication filenames containing special characters getting double-encoded by CiteProc.

Not exactly an ideal fix but seems to work.

Related issues

Closes #2417

How to test

  • Add a file with spaces in the filename to the Publication File field in a publication.
  • Ensure the link rendered in the publication citation isn't double-encoded.

Types of changes

Arizona Quickstart (install profile, custom modules, custom theme)

  • Patch release changes
    • Bug fix
    • Accessibility, performance, or security improvement
    • Critical institutional link or brand change
    • Adding experimental module
    • Update experimental module
  • Minor release changes
    • New feature
    • Breaking or visual change to existing behavior
    • Upgrade experimental module to stable
    • Enable existing module by default or database update
    • Non-critical brand change
    • New internal API or API improvement with backwards compatibility
    • Risky or disruptive cleanup to comply with coding standards
    • High-risk or disruptive change (requires upgrade path, risks regression, etc.)
  • Other or unknown
    • Other or unknown

Drupal core

  • Patch release changes
    • Security update
    • Patch level release (non-security bug-fix release)
    • Patch removal that's no longer necessary
  • Minor release changes
    • Major or minor level update
  • Other or unknown
    • Other or unknown

Drupal contrib projects

  • Patch release changes
    • Security update
    • Patch or minor level update
    • Add new module
    • Patch removal that's no longer necessary
  • Minor release changes
    • Major level update
  • Other or unknown
    • Other or unknown

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@joeparsons joeparsons self-assigned this May 23, 2023
@joeparsons joeparsons requested a review from a team as a code owner May 23, 2023 01:00
@joeparsons joeparsons added bug Something isn't working patch release Issues to be included in the next patch release labels May 23, 2023
@joeparsons joeparsons requested a review from tadean May 23, 2023 01:01
@joeparsons
Copy link
Member Author

@JoeLutovsky ProboCI site URL for review:
https://9b7902ce-8cc1-4a9c-b4aa-cc1ed08e6449.probo.build/

@tadean
Copy link
Contributor

tadean commented May 24, 2023

This seems to work to resolve the double escaping in my testing. I think it's a reasonable solution - perhaps this can be reconciled in the future with a little refactoring of how currently the possible links for the title are coming from a variety of places.

Copy link
Contributor

@bberndt-uaz bberndt-uaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in Probo: a publication file with spaces in the filename is correctly linked. A publication file with spaces replaced by %20 is also correctly linked, but the URL for the linked file includes %2520 in place of %20.

@tadean tadean merged commit 7817efa into main May 24, 2023
@tadean tadean deleted the issue/2417 branch May 24, 2023 17:30
@trackleft trackleft mentioned this pull request Jun 16, 2023
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working patch release Issues to be included in the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Publication Content Type is double-encoding spaces in a file name URL leading to a 404
3 participants