Skip to content

Conversation

@dharamghevariya
Copy link
Contributor

Description

When the text contains multiple occurrences of special characters (".", ",", and "/" in our case), only the first occurrence was being replaced with the corresponding encoding because the replace() function was used. I have updated it to use replaceAll() which fixes this issue. I have also updated our test for text with special characters to ensure this case is covered.

Issue Ticket Number

Fixes #233

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Fix or improve the documentation
  • This change requires a documentation update

Checklist

  • I have followed the contributing guidelines of this project as mentioned in CONTRIBUTING.md
  • I have created an issue ticket for this PR
  • I have checked to ensure there aren't other open Pull Requests for the same update/change?
  • I have performed a self-review of my own code
  • I have run tests locally to ensure they all pass
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes needed to the documentation

@eportis-cloudinary eportis-cloudinary self-requested a review October 21, 2025 19:55
Copy link
Contributor

@eportis-cloudinary eportis-cloudinary left a comment

Choose a reason for hiding this comment

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

Great catch, and thanks for updating the relevant test. Just a note that I tested this with the URL I filed in the issue too, and it gave me two commas in the rendered text overlay, so this for sure works end to end.

@eportis-cloudinary eportis-cloudinary merged commit d682ce2 into cloudinary-community:main Oct 21, 2025
@jlooper-cloudinary
Copy link
Collaborator

@eportis-cloudinary @dharamghevariya in case you want this to count for Hacktoberfest, I've added the appropriate tags. If you are looking for Hacktoberfest swag, please let us know your email address!

@eportis-cloudinary
Copy link
Contributor

@all-contributors please add @dharamghevariya for code

@allcontributors
Copy link
Contributor

@eportis-cloudinary

I've put up a pull request to add @dharamghevariya! 🎉

@devpatocld
Copy link

@dharamghevariya Thank you for your contribution to Hacktoberfest! As a token of our thanks, we at Cloudinary have emailed you with instructions on how to claim your bespoke 2025 swag pack

@dharamghevariya
Copy link
Contributor Author

@jlooper-cloudinary, @eportis-cloudinary, and @devpatocld
Thank you guys, you have been amazing maintainers!

@github-actions
Copy link

🎉 This PR is included in version @cloudinary-util/url-loader-v6.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

[Bug] Double-commas in text overlays are not encoded properly

4 participants