cloudinary-community / cloudinary-community/next-cloudinary
[Bug] getCldOgImageUrl - Multiple commas in overlay text do not encode correctly, causing link to fail.
- Dominant language
- JavaScript
- Stars
- 300
- Forks
- 137
- Avg merge
- 3m
- Merged PRs (30d)
- 2
Description
# **Bug Report**
## **Describe the bug**
Using the social media card sample here: https://next.cloudinary.dev/templates/social-media-cards#one-third
Change the sample body text from this:
`const body = 'Get the power of Cloudinary in a Next.js project with Next Cloudinary!';`
to this (add two or more commas after get):
`const body = 'Get,, the power of Cloudinary in a Next.js project with Next Cloudinary!';`
The link produced will not display and return a 400 error.
## **Is this a regression?**
Don't know. Just started using this today.
## **Steps To Reproduce the error**
1. Set the text property of an overlay to any string with two or more commas (one works fine).
2. See above example using the social card templates from the documentation
## **Expected behaviour**
Image url should work, return a 200 okay status code, and display two or more commas correctly in the overlay.
## **CodeSandbox or Live Example of Bug**
## **Screenshot or Video Recording**
### **Your environment**
- OS:
- Node version:
- Npm version:
- Browser name and version:
## **Additional context**
Contributor guide
Assessment
This issue has not been assessed yet.