Skip to content

[Bug] getCldOgImageUrl - Multiple commas in overlay text do not encode correctly, causing link to fail. #590

@longda

Description

@longda

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions