Linebreak in WordPress 2.1

In 2.1 seems there’s no way to get extra space using <br /> and linebreaks.

I love linebreaks, and wordpress dev-team hates linebreaks.

When switching from ‘Visual’ to ‘Code’, or when saving, seems wordpress automatically remove simple <p> and <br /> tags…. Maybe for autop friendly and makes the post smaller…perfectly reasonable.

But when you press some shift-enter(generate <br /> in TinyMCE) in Visual, then switch to Code, <br /> will become linebreaks. Then you switch back to Visual, now TinyMCE strip the linebreaks. Without switching, yes, you can save linebreaks correctly, but if you load that article again in the editor, linebreaks will be eaten again by TinyMCE.

And worse thing is, now the post filter doesn’t generate <br /> against linebreaks
Even if I turn off the RTE and manually add 100 <br /> tags, the post filter will eat them all!!

GREAT JOB…I’m starting to feel sorry for upgrade to 2.1….

This entry was posted in wordpress. Bookmark the permalink.

7 Responses to Linebreak in WordPress 2.1

  1. ovizii says:

    hi there,

    I know how you feel, I need spaces too. I even tried some plugins that promise to let you choose how each psot will be formated, individually, but I have not found a working one for wp 2.1

    I NEED spaces, what to do? have you found a solution yet? do you know which file is responsible for filtering? there must be a file which has soem tags defined that will get stripped and a lsit for tags that are allowed, if you find out which file that is, we can modify it so we can use whichever tags we want…

  2. priv says:

    Using <p>&nbsp;</p> is a work-around.

    Add one of that you can have about two-line extra space between paragraphs.

    (But things are more complicate as I complained here, and currently I don’t have a solution to have one-line space in lists without breaking the html)

    Another way I can think of, is using inline css to adjust the space between paragraphs, but that’s crazy.

    Actually I’m giving up currently.

  3. Just noticed same thing on my blog, I either have to add spacing to my tags through the css which will be a nightmare. or live with badly formatted blog text.

    Thats a very bad mistake on their part, it should respect br / tags…

    :(

  4. Chris Coyier says:

    Yeah this is seriously annoying. I have the rich editor turned off completely and can’t get a line break for the life of me. I’m just going to use the work around priv mentioned.

  5. Esme says:

    If someone find a fix for this PLEASE let us know… It’s just painful.

  6. I don’t understand why this is even a problem. When I check the source code of a live page their is no tags at all. They are stripped out. I have tried all the forums. I have adjusted the css, added styles, tried inline styles. Nothing let me create a simple break between paragraphs. This seems to me to be plain stupid. 12/25/2008

  7. Juanita says:

    I can’t say how annoying this is. It seems to not travel across themes. I am sure that the themes are adding CSS code for spacing. I also think that is ridiculous. Why would I type <br> if I did not want a line break. and if I want one there why would you remove it???

    I have no idea why this WordPress feature even exists.

    I also have tried those plugins and with no luck. And I only use the HTML editor not the TinyMCE (WYSIWG).
    I am following this post http://wordpress.org/support/topic/274339 hoping that WP will learn that this feature causes frustration and stop it.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>