lib/onebox/engine/standard_embed.rb in onebox-1.8.48 vs lib/onebox/engine/standard_embed.rb in onebox-1.8.49

- old
+ new

@@ -125,10 +125,10 @@ if favicon && !!(favicon =~ /^\/\//) uri = URI(url) favicon = "#{uri.scheme}:#{favicon}" elsif favicon && favicon.match(/^https?:\/\//i).nil? uri = URI(url) - favicon = if !(favicon =~ /^\//) && uri.path.present? + favicon = if !favicon.start_with?("/") && uri.path.present? "#{uri.scheme}://#{uri.host.sub(/\/$/, '')}#{uri.path.sub(/\/$/, '')}/#{favicon.sub(/^\//, '')}" else "#{uri.scheme}://#{uri.host.sub(/\/$/, '')}/#{favicon.sub(/^\//, '')}" end end