• Resolved tanqeed

    (@tanqeed)


    If I add youtube embed code the video shows up fine on the first comment. But if I add another youtube embed code without manually refreshing the page the embed code gets stripped off in the second/third and all successive comments. Once I manually refresh the page and add a youtube embed code the video shows up again.

    http://wordpress.org/extend/plugins/wp-ajaxify-comments/

Viewing 9 replies - 1 through 9 (of 9 total)
  • janjonas

    (@janjonas)

    Hi,

    thanks for your comment. Could you please provide more details about how you embed the YouTube video? Do you use any WordPress plugin or is the html embed code part of the comment?

    Thread Starter tanqeed

    (@tanqeed)

    I am just using the iframe embed code from the youtube video. I am not using any plugin for displaying youtube videos.

    You can see it here in action. The first comment displays the video while the 2nd/3rd comments the embed code was stripped off and there is no video displayed. I used embed code of other videos – they are not all the same videos.

    I then manually refreshed the page and made a comment with the embed code along with the word “test” and it showed up fine. I then made a comment with another embed code and “test again” and only test again shows up and embed code is stripped off.

    http://tanqeed.com/hollywood/passion-official-trailer/

    Hi,
    as far as I know by default <iframe> tags are not allowed in comments. Have installed any other plugin that enables the <iframe> tags or is the “<iframe>-tag-support” part of your theme?

    Thread Starter tanqeed

    (@tanqeed)

    I have a plugin User Role Editor using which I allow Unfiltered html for people with role of Authors.

    Thanks for your reply. I’ve tried the “User Role Editor” plugin and added the role “unfiltered_html” to my users but still no luck when posting <iframe> tags. Which WordPress version are you using?

    I was only able to post <iframe> tags when editing wp-includes\kses.php similar to the description here http://www.kavdesign.net/blog/coding/how-to-disable-wordpress-html-filter-for-posts-and-pages/.

    After commenting out the following lines:

    // Comment filtering
    if ( current_user_can( 'unfiltered_html' ) )
      add_filter( 'pre_comment_content', 'wp_filter_post_kses' );
    else
      add_filter( 'pre_comment_content', 'wp_filter_kses' );

    posting <iframe> tags was possible but I did not find any conflicts with the WP-Ajaxify-Comments plugin. I think your problems are not caused by my plugin. Please make sure that the <iframe> tags inside the comments are really saved in the database and are returned to the theme when rendering the comment section.

    Hope this helps…

    Thread Starter tanqeed

    (@tanqeed)

    I am using WordPress 3.5.1 and its a child theme of TwentyTen.

    I disabled WP-Ajaxify-Comments plugin and am able to post iframe code one after the other. There’s something with the refreshing of the whole page. If the whole page is refreshed then the embed shows up fine even when using your plugin.

    Thanks for that filter info.

    Hi, could you please send me login credentials for your page that enables me to post comments with <iframe>-tags? You can send me a private message here: http://blog.janjonas.net/contact

    Thanks…

    Thread Starter tanqeed

    (@tanqeed)

    Sent you a private message. Thanks.

    Mark this topic as resolved …

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Youtube Embed Code gets stripped off if page is not manually refreshed’ is closed to new replies.