-
Notifications
You must be signed in to change notification settings - Fork 286
Open
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
cloudinary_gem/lib/cloudinary/utils.rb
Line 399 in 28a9ee6
text = result + smart_escape( smart_escape(text, %r"([,/])")) |
cloudinary_gem/lib/cloudinary/utils.rb
Line 452 in 28a9ee6
keywords.unshift(font_family) |
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"
Metadata
Metadata
Assignees
Labels
No labels