Skip to content

🐛(backend) strip whitespace from media URLs in CORS proxy#2004

Open
maboukerfa wants to merge 1 commit intosuitenumerique:mainfrom
maboukerfa:fix/strip-media-url-proxy
Open

🐛(backend) strip whitespace from media URLs in CORS proxy#2004
maboukerfa wants to merge 1 commit intosuitenumerique:mainfrom
maboukerfa:fix/strip-media-url-proxy

Conversation

@maboukerfa
Copy link
Contributor

@maboukerfa maboukerfa commented Mar 15, 2026

Purpose

Fixes an issue where media URLs with leading or trailing whitespace fail to download via the CORS proxy during PDF export, resulting in missing images in the exported PDF.

Screen.Recording.2026-03-15.at.16.18.45.mov

Proposal

Added .strip() to the URL query parameter in the CORS proxy endpoint to handle URLs with accidental leading/trailing whitespace.

When exporting a document to PDF, having whitespace before or after
the media URL causes the image to not be downloaded via the CORS proxy,
resulting in missing images in the exported PDF.

Signed-off-by: Mohamed El Amine BOUKERFA <boukerfa.ma@gmail.com>
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.

1 participant