Support

Account

Home Forums Gutenberg ACF Block preview html is sanitized in Gutenberg? Reply To: ACF Block preview html is sanitized in Gutenberg?

  • Hey @twansparant!

    This was a fun one to look into!

    Turns out, React’s behaviour for tags like that will be false, so because you’re using JSX parsing for the block, it’s reading it as “false” and not showing it at all.

    If you set them all to “playsinline=’true'” they will work correctly, apart from “muted”, which never appears in the DOM – but this appears to be a known issue with React, and the while the video will actually be muted, it won’t appear in the DOM: https://stackoverflow.com/questions/61510160/why-muted-attribute-on-video-tag-is-ignored-in-react

    Hope this helps!