Support » Fixing WordPress » HTML being stripped out of scheduled posts

  • One of my blogs is about Kickstarter, and I often use their embeddable videos and “project cards”.

    These are iframe embeds.

    However, if I schedule a post, then by the time it goes live these iframe blocks have mysteriously vanished into the aether.

    Anyone else experiencing these problems?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Everyone has, the posts text area doesn’t allow most advanced html and scripting code inside of it.

    The way around it is to program a filter that adds to the_content, for example:

    Taken from this post here:

    function Kickstarter_Parse ($content) {
        global $post;
        $content = preg_replace("/\[kickstarter file=https:\/\/www\.kickstarter\.com\/projects\/([^ ]+) \/\]/i","<iframe frameborder=\"0\" height=\"410px\" src=\"$1/widget/video.html\" width=\"480px\"></iframe>",$content);
        return $content;
    add_filter('the_content', 'Kickstarter_Parse');

    Then you do [kickstarter file=https://theurlofthekickstartervideo] inside your post and that will retranslate it out to the whole iframe code.

    Thanks Frumph.

    Odd,though. That post is from September. This was working fine for me until 3.5. (I should have mentioned as much. )

    Very frustrating to lose functionality like that, but I’ll try doing it the way you suggest. )

    (If any developers are reading this, I’d like to suggest that it’s dangerous to allow iframes in previews and live post editing, but then strip then out of scheduled posts when they go live. That’s the worst possible time to make changes without the user’s knowledge! )

    To anyone else is having this problem :

    If I’m reading this right, it looks like the problem has been identified and fixed. (Bug ticket #22944)

    Just have to be patient and wait for version 3.5.1

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘HTML being stripped out of scheduled posts’ is closed to new replies.