lib/onebox/engine/replit_onebox.rb in onebox-1.7.3 vs lib/onebox/engine/replit_onebox.rb in onebox-1.7.4
- old
+ new
@@ -7,14 +7,13 @@
matches_regexp(/^https?:\/\/repl\.it\/.+/)
always_https
def placeholder_html
oembed = get_oembed
+ escaped_src = ::Onebox::Helpers.normalize_url_for_output(oembed[:thumbnail_url])
- # we want the image to have the same dimensions as the embedded html
-
<<-HTML
- <img src="#{oembed[:thumbnail_url]}" style="max-width: #{oembed[:width]}px; max-height: #{oembed[:height]}px;" #{Helpers.title_attr(oembed)}>
+ <img src="#{escaped_src}" style="max-width: #{oembed[:width]}px; max-height: #{oembed[:height]}px;" #{Helpers.title_attr(oembed)}>
HTML
end
def to_html
oembed = get_oembed