Support » Fixing WordPress » editor changing formatting

  • This is driving me crazy. I have a page with a form in it. I want to enter the simplest sort of html code, so I do this:

    Your name: <input name="submittername" type="text"/><br />
    Your E-mail address: <input name="submitteremail" type="text" />

    However, wordpress then mucks with my code! it ends up looking like this (view source in browser)

    <p>Your name:<br />
    <input name="submittername" type="text"/>
    Your E-mail address:<br />
    <input name="submitteremail" type="text" />

    It’s putting br tags *before* each input tag for some reason, and getting rid of the line breaks that I’ve explicitly includ

    I’m not using the WYSIWYG editor at all, so that’s not at fault. Also, the code in the db is not being altered – if I manual
    ly login to the db and load that post’s content, I see exactly what I originally typed, so it’s just when the post it proces
    sed and displayed as part of the site that it’s being altered like this.

    What can I do to fix it? Ideally, I’d just like to turn off whatever formatting WP is doing, since it’s a PITA.

Viewing 5 replies - 1 through 5 (of 5 total)
  • So I guess this is just plain broken… Should I send a bug report instead of forum posts?

    For now, I’ve done a workaround by making a new template with the html I need in it, so it won’t get modified by wordpress, but I can’t go doing that for every page that gets this kind of broken autoformatting done to it.

    I’ve been desperately looking for a plugin that will address this issue also.

    I need to be able to keep some WYSIWYG controls, but lose the annoying formatting (p tags and divs disappearing, etc.)

    This bug has been described all over, and none of the offered fixes worked for me (at least not in Firefox on the Mac, if that matters). What didn’t work: The disable auto formatting plugin (sorry, I forget the name), changing “force_br_newlines”, “force_p_newlines” in that evil little tinymce.js, using Shift-Enter to create a new line, and a couple of others that seemed to be about an earlier WP version (I’m on 2.2.2).
    The only thing that worked was writing the page content in a plain text editor, creating a div, coding each paragpraph with p tags, ending the div, then copying and pasting the whole thing into the Code Editor. When I viewed the source, the paragraph tags were there, and the page itself was fine. BUT, I could not change so much as a space in the Code Editor without losing everything. So I made all my changes in the plain text editor and repeated the cut/paste operation. Insane.

    I just found yet another plugin to try:
    But have not used it yet because I spent 3 hours writing a page and have had it.
    Related posts:

    I apologize for adding to the lengthy discourse on this one. But if you are desperate, the plain text editor/cut & paste/div option seems to work on a one-off basis.

    disable-autop was the plugin that did not work for me. It went back over all previous posts that were just fine and stipped out the line breaks.

    And I just realized that the problems I am having with the Code Editor ditching my formatting are happening on Pages, so maybe WP 2.2.2 fixed the post editing problem, but not the page editing. . . seems like they’d be the same?

    I just upgraded to 2.3.2, and having exactly the same issue still. The editor gets rid of tables, removes linebreaks etc. entered in code view. Is there any way to protect hand-coded parts of the page?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘editor changing formatting’ is closed to new replies.