Skip to content

v2.4.0

Latest

Choose a tag to compare

@awcodes awcodes released this 06 Oct 18:23
· 2 commits to 2.x since this release
a66c8df

New

  • EmbedPlugin::allowEmbedsIn() lets embeds survive RichContentRenderer::toHtml(). Filament's sanitizer removes <iframe>, so embeds used to render as an empty <div class="embed">. The helper allows the embed's iframe, and keeps its src only for https URLs on YouTube, YouTube's privacy-enhanced domain and Vimeo, or on hosts you pass. See Rendering → Embeds.
$this->app->extend(
    HtmlSanitizerConfig::class,
    fn (HtmlSanitizerConfig $config): HtmlSanitizerConfig => EmbedPlugin::allowEmbedsIn($config),
);

Fixes

  • Responsive embed sizes no longer grow. Each time the editor re-read its own HTML (in the source-code modal, or when loading content stored as HTML), a responsive embed's stored size grew tenfold. The aspect ratio was never affected. Embeds already saved with an inflated size keep it, but no longer grow.

What's Changed

  • fix: stop responsive embeds growing, add a sanitizer helper for embeds by @awcodes in #35

Full Changelog: v2.3.3...v2.4.0