Issue with HTML block

I’m currently using OmekaS 4.0.4. When i tried to add custom HTML formatting using inline CSS in the HTML block source.

For instance, i tried to add :

  1. <p style="text-align:center">description</p>
  2. <iframe width="560" height="315" src="https://www.youtube.com/embed/dAT96Cs-nEs?si=5soZeip0gtEuOM9_" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

both are not working as expected.

I think the promise of adding custom HTML elements with custom CSS is not working out. Any suggestion or help is appreciated.

You might check the security settings for your installation. When “Use HTMLPurifier” is enabled under Settings → Security then the HTML is filtered. That’s definitely something that would have an impact on your iframe.

If you disable the purifier, any users with access to add or edit HTML can use whatever elements or markup they want. You’d have to decide if that’s appropriate for your use case or not.

1 Like