Replace deprecated iFrame frameborder with border: 0

This commit is contained in:
Nick Schonning 2024-12-17 12:32:02 -05:00
parent 8770905186
commit 7aafb12700
No known key found for this signature in database
GPG Key ID: 5DDAAD9C9AAFFD9F
3 changed files with 3 additions and 3 deletions

View File

@ -101,9 +101,9 @@ const EmbedModal: React.FC<{
/> />
<iframe <iframe
frameBorder='0'
ref={iframeRef} ref={iframeRef}
sandbox='allow-scripts allow-same-origin' sandbox='allow-scripts allow-same-origin'
style={{ border: 0 }}
title='Preview' title='Preview'
/> />
</div> </div>

View File

@ -145,7 +145,7 @@ class LinkDetailsExtractor
end end
def html def html
player_url.present? ? content_tag(:iframe, nil, src: player_url, width: width, height: height, allowfullscreen: 'true', allowtransparency: 'true', scrolling: 'no', frameborder: '0') : nil player_url.present? ? content_tag(:iframe, nil, src: player_url, width: width, height: height, allowfullscreen: 'true', allowtransparency: 'true', scrolling: 'no', style: 'border: 0') : nil
end end
def width def width

View File

@ -136,7 +136,7 @@ class Sanitize
attributes: { attributes: {
'audio' => %w(controls), 'audio' => %w(controls),
'embed' => %w(height src type width), 'embed' => %w(height src type width),
'iframe' => %w(allowfullscreen frameborder height scrolling src width), 'iframe' => %w(allowfullscreen frameborder height scrolling src style width),
'source' => %w(src type), 'source' => %w(src type),
'video' => %w(controls height loop width), 'video' => %w(controls height loop width),
}, },