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 preview thumbnailing for images with ampersand (&) in file name #16609

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

smg6511
Copy link
Collaborator

@smg6511 smg6511 commented Aug 31, 2024

What does it do?

URL encodes the src property used in building the image TV type’s phpthumb preview link.

Why is it needed?

The unencoded property was mangling the request when an ampersand was present in the file source path, preventing the creation of preview images.

How to test

  1. Create at least one folder and one image with '&' in the name.
  2. Create an image TV, assign it to a Template/Resource, and select the images you’ve created via the TV.
  3. Verify that the preview shows and also shown when selecting a different image via the TV.

Related issue(s)/PR(s)

For 3.x:
Resolves #14264
Resolves #13412

Copy link
Member

@theboxer theboxer left a comment

Choose a reason for hiding this comment

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

Works nicely, thank you!

@opengeek opengeek merged commit fe410d7 into modxcms:3.x Sep 3, 2024
5 checks passed
opengeek pushed a commit that referenced this pull request Sep 3, 2024
…16609)

### What does it do?
URL encodes the src property used in building the image TV type’s
phpthumb preview link.

### Why is it needed?
The unencoded property was mangling the request when an ampersand was
present in the file source path, preventing the creation of preview
images.

### How to test

1. Create at least one folder and one image with '&' in the name.
2. Create an image TV, assign it to a Template/Resource, and select the
images you’ve created via the TV.
3. Verify that the preview shows and also shown when selecting a
different image via the TV.

### Related issue(s)/PR(s)
For 3.x:
Resolves #14264
Resolves #13412
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants