FIX: Explicitly set allowfullscreen on Wistia Oneboxes (#15828)

This commit is contained in:
jbrw 2022-02-07 21:02:32 -05:00 committed by GitHub
parent 6758835387
commit 4ef56b0ca4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,25 @@ module Onebox
always_https
def to_html
get_oembed.html
oembed = get_oembed
extracted_url = oembed.html.match(/iframe\ src\=\"(.*?)\"/)
if extracted_url
iframe_src = extracted_url[1]
<<-HTML
<iframe
src="#{iframe_src}"
width="#{oembed.width}"
height="#{oembed.height}"
title="#{oembed.title}"
frameborder="0"
allowfullscreen
></iframe>
HTML
else
oembed.html
end
end
def placeholder_html