Spaces in Font's name are not escaped
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
Research direction
Start in lib/cloudinary/utils.rb, comparing the text transformation escaping around line 399 with the font-family handling around line 452. Reproduce the Open Sans example from the issue and verify that the generated Cloudinary URL escapes spaces in the font name and can be parsed as a valid URI.
Written by the indexing model from the issue text.
Description
Cloudinary supports all of Google's fonts https://support.cloudinary.com/hc/en-us/articles/203352832-What-is-the-list-of-supported-fonts-for-text-overlay-transformation- and some of them have spaces on them, for example, "Open Sans"
But unlike Text Transformation where spaces are escaped https://github.com/cloudinary/cloudinary_gem/blob/28a9ee65d24c6bac0654919a5a76de95cf356510/lib/cloudinary/utils.rb#L399 font family aren't https://github.com/cloudinary/cloudinary_gem/blob/28a9ee65d24c6bac0654919a5a76de95cf356510/lib/cloudinary/utils.rb#L452
resulting in an invalid URL
[1] pry(main)> Cloudinary::VERSION
=> "1.20.0"
[2] pry(main)> url = Cloudinary::Utils.cloudinary_url("coffee_cup.jpg", transformation: [
{overlay: {font_family: "Open Sans", text: "Text with spaces", font_size: 10}}
])
=> "http://res.cloudinary.com/cookpad/image/upload/l_text:Open Sans_10:Text%20with%20spaces/coffee_cup.jpg"
[3] pry(main)> URI.parse url
URI::InvalidURIError: bad URI(is not URI?): "http://res.cloudinary.com/cookpad/image/upload/l_text:Open Sans_10:Text%20with%20spaces/coffee_cup.jpg"
- Dominant language
- Ruby
- Stars
- 420
- Forks
- 282
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cloudinary/cloudinary_gem
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
cloudinary/cloudinary_gem#597 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 52/100
cloudinary/cloudinary_gem#591 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
cloudinary/cloudinary_gem#582 · 1 comment ·
-
404's when fetching .eml files (from Action Mailbox)May be free again @rnamba-cloudinary claimed this 400 days ago, and no pull request is open. Open
Difficulty 4/5 3-5 days Newbie friendliness 30/100
cloudinary/cloudinary_gem#581 · 1 comment ·
-
BlobKey, MirrorService and Sidekiq 8 are incompatibleMay be free again @const-cloudinary claimed this 541 days ago, and no pull request is open. Open
cloudinary/cloudinary_gem#573 · 3 comments · 1 assignee ·
All issues in cloudinary/cloudinary_gem
Similar issues
-
releases.rb silent failure cascades into NoMethodError crashes in downstream extensionsPossibly taken @Rucha0901 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
jenkins-infra/jenkins.io#9598 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
yegor256/mailanes#361 · 1 comment ·
Maintainers usually reply within 1 day
-
Property accounts have no notes fieldPossibly taken @arnaurodondev claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
we-promise/sure#5057 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
metacall/core#964 · 1 comment ·
Maintainers usually reply within 1 day
-
Mend: dependency security vulnerability
Difficulty 1/5 Under an hour Newbie friendliness 80/100