Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.59k stars 799 forks source link

Photon: issues with double encoding #40290

Open jeherve opened 1 day ago

jeherve commented 1 day ago

Impacted plugin

Jetpack, Boost

Quick summary

Following #39560, some images cannot be displayed properly.

Steps to reproduce

  1. Start with a site running Photon.
  2. Go to Posts > Add New
  3. Add an image block
  4. Pick the "insert via URL" option
  5. Insert an image with a space in the file name, converted into %20
  6. Publish your post.

A clear and concise description of what you expected to happen.

I would expect the image to be displayed in the post.

What actually happened

It isn't. %20 is turned into %2520.

Impact

Some (< 50%)

Available workarounds?

Yes, easy to implement

If the above answer is "Yes...", outline the workaround.

Right now, the workaround would be to not insert any images with spaces in the filename. That is something WordPress solves when you upload to the media library for example.

Platform (Simple and/or Atomic)

Atomic, Self-hosted

Logs or notes

Reported in p1732130198644889-slack-C0299DMPG

jeherve commented 1 day ago

@haqadn Do you think you could take a look, since you worked on #39560?

Thank you!

github-actions[bot] commented 1 day ago

OpenAI suggested the following labels for this issue: