• Resolved ubiqq

    (@ubiqq)


    Thanks for creating such an amazing plugin – a real life-saver.

    I’m importing a large number of HTML pages that I’ve downloaded using SiteSucker. It’s working flawlessly, but for one thing: in the post content of almost every page there is a SoundCloud iframe that seems to be stripped on import.

    Typical the markup looks something like this:

    <iframe src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/12345&color=f500ba&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false" frameborder="no" scrolling="no" width="100%" height="166"></iframe>

    …which is being removed on import. I’ve tried adding <iframe> to ‘Allowed HTML’ and href,alt,title,src,frameborder,scrolling,width,height to ‘Allowed Attributes’. I’ve even tried turning off ‘Clean up bad HTML’, but it still strips the iframe code.

    Do you have any idea of a workaround for this? Your help is gratefully appreciated.

    https://ww.wp.xz.cn/plugins/import-html-pages/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Stephanie Leary

    (@sillybean)

    I suspect this is not the importer’s doing, but WordPress’s. I don’t think the visual editor allows iframes. Can you check the post content in the database after you’ve imported, but before you’ve opened the page in the editing screens, to see if the iframe is still there?

    Thread Starter ubiqq

    (@ubiqq)

    Based on your comment, I tried leaving ‘Clean up bad HTML on’, and keeping all of the allowed attributes, but added the following filter:

    add_filter( 'force_filtered_html_on_import' , '__return_false' );

    …which worked perfectly!

    Thanks very much for your help.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Importing iframe markup’ is closed to new replies.