lib/onebox/engine/sketchfab_onebox.rb in onebox-1.8.79 vs lib/onebox/engine/sketchfab_onebox.rb in onebox-1.8.80

- old
+ new

@@ -6,29 +6,25 @@ matches_regexp(/^https?:\/\/sketchfab\.com\/(?:models\/|3d-models\/(?:[^\/\s]+-)?)([a-z0-9]{32})/) always_https def to_html - opengraph = get_opengraph + og = get_opengraph + src = og.video_url.gsub("autostart=1", "") - src = opengraph[:video_url].gsub("autostart=1", "") - escaped_src = ::Onebox::Helpers.normalize_url_for_output(src) - <<-HTML - <iframe src="#{escaped_src}" - width="#{opengraph[:video_width]}" - height="#{opengraph[:video_height]}" + <iframe src="#{src}" + width="#{og.video_width}" + height="#{og.video_height}" scrolling="no" frameborder="0" allowfullscreen> </iframe> HTML end def placeholder_html - opengraph = get_opengraph - escaped_src = ::Onebox::Helpers.normalize_url_for_output(opengraph[:image]) - "<img src='#{escaped_src}'>" + "<img src='#{get_opengraph.image}'>" end end end end