Spaces in Font's name are not escaped
還沒有人認領這個 Issue。
評估
研究方向
從 lib/cloudinary/utils.rb 開始,將第 399 行附近的文字轉換逸出處理與第 452 行附近的 font-family 處理進行比較。重現 issue 中的 Open Sans 範例,並驗證產生的 Cloudinary URL 會對字型名稱中的空格進行逸出,且可以解析為有效的 URI。
由索引模型根據 Issue 內容生成。
描述
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"
- 主要語言
- Ruby
- 星號
- 420
- 分支
- 282
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
cloudinary/cloudinary_gem 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 55/100
cloudinary/cloudinary_gem#597 · 1 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 52/100
cloudinary/cloudinary_gem#591 · 3 則留言 ·
-
難度 3/5 1-2 天 新手友好度 45/100
cloudinary/cloudinary_gem#582 · 1 則留言 ·
-
404's when fetching .eml files (from Action Mailbox)可能重新可做 @rnamba-cloudinary 於 400 天前認領,目前沒有進行中的 PR。 未關閉
難度 4/5 3-5 天 新手友好度 30/100
cloudinary/cloudinary_gem#581 · 1 則留言 ·
-
BlobKey, MirrorService and Sidekiq 8 are incompatible可能重新可做 @const-cloudinary 於 541 天前認領,目前沒有進行中的 PR。 未關閉
cloudinary/cloudinary_gem#573 · 3 則留言 · 已指派 1 人 ·
查看 cloudinary/cloudinary_gem 的全部 Issue
相似的 Issue
-
bug
難度 1/5 1 小時以內 新手友好度 88/100
yegor256/mailanes#361 · 1 則留言 ·
維護者通常 1 天內回覆
-
Property accounts have no notes field可能已有人在做 @arnaurodondev 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 82/100
we-promise/sure#5057 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 65/100
維護者通常 1 天內回覆
-
area: ci benchmark build developer-experience difficulty: easy dx enhancement github-actions good first issue hacktoberfest help wanted performance quality rank: 8 kyu ruby tech: ruby
難度 1/5 1 小時以內 新手友好度 82/100
flisk-sh/flisk-labs#22 ·
-
1.severity: security
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 1 天內回覆