-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spaces in Font's name are not escaped #458
Comments
@tejanium firstly apologies for the delay in getting back here, this got lost in our backlog. Regarding the customer font, you can just URL encode the space before making the request and it will work e.g. https://res.cloudinary.com/cookpad/image/upload/l_text:Open%20Sans_60:Text%20with%20spaces/sample.jpg let me know if resolves your issue? |
Thank you for getting back to me
Yes, this is what we ended up doing. But I think this should be part of the library. |
@tejanium no problem and fair point, let me raise it internally and hopefully we will have a fix soon. |
also as a workaround, for now, you could escape the space when it comes to fonts with spaces like |
Yes, that's what we did def safe_font_family
ERB::Util.url_encode(font_family)
end |
so this is in our list to fix but no ETA currently but will keep you posted. |
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
cloudinary_gem/lib/cloudinary/utils.rb
Line 452 in 28a9ee6
resulting in an invalid URL
The text was updated successfully, but these errors were encountered: