WordPress.org

Ready to get started?Download WordPress

Forums

iFrame src getting re-written/escaped (2 posts)

  1. reachsneaker
    Member
    Posted 5 years ago #

    Hi,

    I imported posts over from blogger into wordpress. Some of blogger posts contained an iFrame. However, when wordpress serves up those posts, the src of the iframe has been escaped. Specifically the '&' is replaced by '&' and this breaks the iFrame code.

    I have made sure that the option for "WordPress should correct invalidly nested XHTML automatically" is disabled.

    What can I do to prevent wordpress from changing the src for the iFrame??

    Thanks!

  2. Josh Leuze
    Member
    Posted 5 years ago #

    The visual editor that WordPress uses only supports basic HTML, an iframe or anything more advanced than that is going to cause problems.

    You can disable the visual editor and code your post in HTML, but that can be a hassle, and if switch back to visual ever and edit that post, it will screw up the code.

    The best approach is to use a plugin to add the functionality you need.

    Raw HTML is a great plugin, you can wrap your iframes in Raw tags, and it will be protected from the editor.

    There are also some plugins specifically for embedding iframes, such as this one.

Topic Closed

This topic has been closed to new replies.

About this Topic