Merge pull request #2533 from vcuculo/2488-fix-oembed
Fix #2488 soundcloud embedding
This commit is contained in:
commit
31fda67dd3
2 changed files with 2 additions and 2 deletions
|
|
@ -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_')
|
||||||
|
|
|
||||||
|
|
@ -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']}/
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue