Merge pull request #2533 from vcuculo/2488-fix-oembed

Fix #2488 soundcloud embedding
This commit is contained in:
Daniel Grippi 2011-12-19 13:45:56 -08:00
commit 31fda67dd3
2 changed files with 2 additions and 2 deletions

View file

@ -20,7 +20,7 @@ module OEmbedHelper
else else
end end
return html.gsub('http', 'https').html_safe return html.gsub('http://', 'https://').html_safe
end end
def link_to_oembed_image(cache, prefix = 'thumbnail_') def link_to_oembed_image(cache, prefix = 'thumbnail_')

View file

@ -109,7 +109,7 @@ describe OEmbedHelper do
real_data = data['oembed_data'] real_data = data['oembed_data']
cache = OEmbedCache.new(:url => data['link_url']) cache = OEmbedCache.new(:url => data['link_url'])
cache.data = real_data cache.data = real_data
formatted = o_embed_html(cache).gsub('https', 'http') formatted = o_embed_html(cache).gsub('https://', 'http://')
case type case type
when 'photo' when 'photo'
formatted.should =~ /#{data['oembed_data']['url']}/ formatted.should =~ /#{data['oembed_data']['url']}/