From cee6fb3061a83706f262d882636f31090dd19f46 Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 27 Feb 2025 11:34:07 +0100 Subject: [PATCH] Change HTML sanitization to remove unusable and unused `embed` tag (#34021) --- lib/sanitize_ext/sanitize_config.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/sanitize_ext/sanitize_config.rb b/lib/sanitize_ext/sanitize_config.rb index 703ba8b059..d1cbca2f29 100644 --- a/lib/sanitize_ext/sanitize_config.rb +++ b/lib/sanitize_ext/sanitize_config.rb @@ -94,19 +94,17 @@ class Sanitize ] ) - MASTODON_OEMBED ||= freeze_config( - elements: %w(audio embed iframe source video), + MASTODON_OEMBED = freeze_config( + elements: %w(audio iframe source video), attributes: { 'audio' => %w(controls), - 'embed' => %w(height src type width), 'iframe' => %w(allowfullscreen frameborder height scrolling src width), 'source' => %w(src type), 'video' => %w(controls height loop width), }, protocols: { - 'embed' => { 'src' => HTTP_PROTOCOLS }, 'iframe' => { 'src' => HTTP_PROTOCOLS }, 'source' => { 'src' => HTTP_PROTOCOLS }, },