WordPress.org

Ready to get started?Download WordPress

Forums

When adding a new post in raw HTML mode, it still messes up my form's HTML (2 posts)

  1. dumbmatter
    Member
    Posted 3 years ago #

    When I try to include an HTML form in a WordPress blog post, it screws up the formatting. And yes, I am doing all my editing in the "HTML" mode and not the "Visual" mode.

    Steps to reproduce problem:

    1. Add a new post with this as the contents (in HTML mode!):

    <form>
    <label>Label:</label>
    <input />
    </form>

    2. Click Preview and then view the source of the preview page. It looks like this:

    <form>
    <label>Label:</label></p>
    <input />
    </form>

    This is problematic because we browsers interpret the added </p> tag as <p></p>, so the input box is on a new line, when it is really supposed to be next to the label.

    If I put the label and input tags on the same line, then WordPress inserts a
    tag between them instead of a </p>.

  2. dumbmatter
    Member
    Posted 3 years ago #

    Never mind, this fixes it for anyone who has the same problem: http://wordpress.org/extend/plugins/raw-html/

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags