wdpr
    Preparing search index...

    Module elements/embed-block

    Renderer for [[embed]]...[[/embed]] block-level embeds.

    Unlike inline embeds (which target specific providers like YouTube), embed blocks contain raw HTML that the user provides. This module validates and sanitizes that HTML through a multi-layer pipeline:

    1. sanitize-html strips everything except a single <iframe> with a limited set of safe attributes.
    2. The iframe's src URL must use HTTP or HTTPS.
    3. The hostname and path must match the configured allowlist (or the allowlist can be set to null for Wikidot's "anyiframe" mode).

    If any validation step fails, a Wikidot-compatible error block is rendered instead.

    Interfaces

    EmbedAllowlistEntry

    Variables

    DEFAULT_EMBED_ALLOWLIST

    Functions

    renderEmbedBlock