• Resolved peebee10

    (@peebee10)


    Hello.

    I’m using pure custom HTML for my coming soon page.

    I’m trying to embed a Google Map iframe into the custom HTML editor. The editor accepts and saves the embed code (the iframe is still visible in the editor after saving) but the embed code itself is stripped on page load in the browser. No errors – just code is stripped.

    I tried an iframe plugin which allows for [iframe src=……] but that didn’t work either.

    Any idea how to resolve? Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Alexandru Tapuleasa

    (@talextech)

    WordPress security guidelines require sanitizing all HTML output so there’s a function in framework/init.php wp_kses_wf() around line 130 which handles that.

    Try adding another tag block for iframe with all the attributes you need like src. Something like:
    $allowed_tags['iframe'] = array(
    'style' => true,
    'class' => true,
    'id' => true,
    'data-*' => true,
    'src' => true,
    );

    Thread Starter peebee10

    (@peebee10)

    Thanks for the quick reply. I figured it was WordPress stripping the code, I just didn’t know how to get around it. Your solution sounds logical. I’ll give it a go.

    Thanks and very much appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.