[resolved] Random <p> and </p> (6 posts)

  1. yorokobi
    Posted 8 years ago #

    Anyone know why, or better yet where, random <p>s come from in a post? I am NOT using the MCE because it keeps thinking it knows better then I do how to format the posts.

    I'm using <div> tags with the style attribute so I can customize the layout and so forth and it LOOKS A-OK. However, if I try to validate it I get errors about <p> tags being in the wrong place or </p> being there when it's not needed.

    They show up slap in the middle of my posted code, in the browser's source view, but when I check the post in the editor they aren't there.

    Ergo, some piece of the code is generating them.

    I figure either

    • A - The code needs correcting
    • B - I need to hack it (rather not, makes upgrades a pain)
    • C - There might be a plugin to prevent this?

    All I want is for it to post what I wrote and stop mucking about with it...

  2. Jonathan Landrum
    Posted 8 years ago #

    There are a number of threads on this. There's a fix on this one, though:

  3. yorokobi
    Posted 8 years ago #

    Nope, there aren't. But since you sent me there I tried the disable wpautop plugin. It works GREAT (and I may keep it) but it doesn't fix my problem, the <p>s persist.

  4. Dion Hulse
    Lead Developer
    Posted 8 years ago #

    this may be related..

    "but it doesn't fix my problem, the <p>s persist."
    have you started from scratch again for the post? Its only going to affect posts as they get inserted, once they're put in with the incorrect tags i dont believe they get changed unless you re-do the post?

  5. yorokobi
    Posted 8 years ago #

    I'm working too hard... I can't recall which project this was affecting...

    Well, if I find it again, I'll keep the new post thing in mind. I didn't think about it working with my text before storing it in the database (doi!)


  6. yorokobi
    Posted 8 years ago #

    Found it, it was the WordPress plugin throwing an extra <P> in there. I commented that line out and now it's all good.

Topic Closed

This topic has been closed to new replies.

About this Topic