Skip to content

Fix background-image URLs with weird characters#9468

Merged
ahukkanen merged 2 commits intodevelopfrom
fix/escape-background-image-urls
Jun 28, 2022
Merged

Fix background-image URLs with weird characters#9468
ahukkanen merged 2 commits intodevelopfrom
fix/escape-background-image-urls

Conversation

@andreslucena
Copy link
Copy Markdown
Member

@andreslucena andreslucena commented Jun 23, 2022

🎩 What? Why?

While publishing the next DecidimFest, we saw that images with weird characters in their filename (like banner-web(1).png) didn't get displayed correctly after uploading them.

This was happening in the "Hero image" homepage Content Block, but its happening in other places as this is a pattern that we repeat in other views.

This PR fixes that.

Testing

  1. Sign in as admin
  2. Go to http://localhost:3000/admin/organization/homepage/content_blocks/hero/edit
  3. Upload a background image with a filename like "banner-web(1).png"
  4. Click on the "Update" button
  5. See that the image isn't correctly shown

📷 Screenshots

Before

Selection_243

After

Selection_244

♥️ Thank you!

Copy link
Copy Markdown
Contributor

@ahukkanen ahukkanen left a comment

Choose a reason for hiding this comment

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

Great!

I did not find any other references except in the design app which is being deprecated.

@ahukkanen ahukkanen merged commit 61e6f9e into develop Jun 28, 2022
@ahukkanen ahukkanen deleted the fix/escape-background-image-urls branch June 28, 2022 08:02
ahukkanen pushed a commit that referenced this pull request Jul 8, 2022
…9531)

* Fix background-image URLs with weird characters (#9468)

* Fix bad conflict resolution
andreslucena added a commit that referenced this pull request Jul 13, 2022
…9531)

* Fix background-image URLs with weird characters (#9468)

* Fix bad conflict resolution
eliegaboriau pushed a commit to eliegaboriau/decidim that referenced this pull request Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants