File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ class Cloudinary::Utils
139
139
zoom
140
140
] . map ( &:to_sym )
141
141
142
- REMOTE_URL_REGEX = %r(^ftp:|^https?:|^s3:|^gs:|^data:([\w -]+\/ [\w -]+)?(;[\w -]+=[\w -]+)*;base64,([a-zA-Z0-9\/ +\n =]+)$)
142
+ REMOTE_URL_REGEX = %r(^ftp:|^https?:|^s3:|^gs:|^data:([\w -]+\/ [\w -]+( \+ [ \w -]+)? )?(;[\w -]+=[\w -]+)*;base64,([a-zA-Z0-9\/ +\n =]+)$)
143
143
144
144
def self . extract_config_params ( options )
145
145
options . select { |k , v | URL_KEYS . include? ( k ) }
Original file line number Diff line number Diff line change 59
59
"s3://s3-us-west-2.amazonaws.com/cloudinary/images/old_logo.png" ,
60
60
"gs://cloudinary/images/old_logo.png" ,
61
61
"data:image/gif;charset=utf8;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" ,
62
- "data:image/gif;param1=value1;param2=value2;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
62
+ "data:image/gif;param1=value1;param2=value2;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" ,
63
+ "data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPg" ,
63
64
] . each do |url |
64
65
expect ( Cloudinary ::Utils . is_remote? ( url ) ) . to eq ( true ) , url
65
66
end
You can’t perform that action at this time.
0 commit comments