• Resolved pweingart

    (@pweingart)


    Ever since updating my WordPress installation to 2.3.2, I’ve noticed some pretty annoying behavior from the software. At the end of my posts, the software seems to be eating carriage returns. I’ll stick something like

    <hr /><br /><br />text content for a little while<br /><br />

    at the end… and if I come back to edit it again, the breaks are all gone.

    I started putting the breaks in after the 2.3.2 update. Before, I would have simply pressed the carriage return key on my keyboard while editing the post in the “visual” window (as opposed to the “code” window), and the spacing would have been correct.

    Something y’all did in the update makes the editor eat carriage returns. It’s broken. Please fix it.

    Phil W.

Viewing 15 replies - 1 through 15 (of 15 total)
  • Well… I say “good on ya WordPress!” using those <br /> tags is bad practice anyway, it’s correcting you wether it means to or not.

    Use your CSS to control spacing between elements.

    Thread Starter pweingart

    (@pweingart)

    Sheesh.

    You apparently MISSED THE SECOND FREAKIN’ PARAGRAPH, in which I explained that the ONLY FREAKIN’ REASON I WAS USING TO FREAKIN’ BEGIN WITH was that WordPress started eating carriage returns at 2.3.2.

    [Edit by moderator: Rude behavior removed]

    That is not a bug but a desired function.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    That is not a bug, it is by design. WordPress eliminates multiple BR tags in a row (which is what carriage returns get converted into). This is intentional, and what’s more, it’s not new to 2.3.2. It’s been there for quite a while (as part of the autop functionality).

    It will not be fixed, because it’s not considered to be broken.

    Thread Starter pweingart

    (@pweingart)

    What?

    I want vertical space between my horizontal rule, my comments, and the bottom of the post, and WordPress won’t let me insert vertical space?

    This is a desired function?

    Utter crap.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Inserting break tags is not inserting vertical space, it’s just inserting break tags. If you want to insert vertical space, you should be using CSS and/or styling code for that.

    Separation of content and presentation. Content is your text. Presentation is how you see it. Only content should go into the editor, presentation is taken care of by the theme and the stylesheet.

    You could insert <br style="height:4em" /> for example, to make a single 4 line high break.

    But if this is something you want on all the pages, then edit the theme itself to insert that space. If you want your horizontal rule to have some space around it, give it a margin. Use CSS for the layout, that’s what it was intended to do in the first place.

    @pweingart: Dude, chill.

    To insert space around an HR, use CSS in your stylesheet:

    hr{margin:1em 0;}

    Thread Starter pweingart

    (@pweingart)

    [Edit by moderator: Rude behavior removed]

    Listen: I just want some vertical space between the horizontal rule, the text, and the bottom of the post.

    I used to be able to press the return key and get that. Now I can’t.

    SO… if I can’t just press the return key, and I can’t force WordPress to give me vertical space by inserting deliberate breaks…

    HOW DO I ACCOMPLISH VERTICAL SPACING?

    If it’s not a bug, then apparently I need some lessons in simple layout. Because I honestly don’t know any other way to space text other than linefeeds/carriage returns or deliberate breaks.

    Educate me, then.

    Educate me, then.

    You may have missed my response while you were posting.

    Thread Starter pweingart

    (@pweingart)

    adamrbrown: Thanks, that solves ONE problem.

    Now — I suppose I have to modify the CSS <p> behavior to force space between the paragraphs?

    Note: I never used to have to do that, AND I STILL don’t have to do that for the portion of the text that lies above the <hr /> tag.

    I’m telling you, there is a bug. Yes, I can work around it, but this is NOT well-behaved code.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    If it’s not a bug, then apparently I need some lessons in simple layout. Because I honestly don’t know any other way to space text other than linefeeds/carriage returns or deliberate breaks.

    Yes, you need lessons in simple layout and web design. The theme controls what the page looks like. The post editor only controls the content of the post.

    If you want vertical spacing, you specify some particular item and specify the spacing around it.

    Example: Take this site:
    http://www.plumbbobblog.com/?p=145

    There’s the content of the post, a divider, and then the comments. The divider is done by having a div with a “divider” id.

    So, if you wanted more space around the divider, you could add this to the theme’s CSS:

    .divider {
    margin-top: 50px;
    margin-bottom: 50px;
    }

    And then it would get some vertical space.

    Note: I never used to have to do that, AND I STILL don’t have to do that for the portion of the text that lies above the <hr /> tag.

    What you’re saying doesn’t make any sense. The editor only has two ways to read extra carriage returns. More than 1 = new Paragraph, which make it surround the text in a P tag. Just one = break only.

    Note that the visual editor behaves slightly differently than the non-visual one. It assumes 1 CR = a new paragraph. A shift-enter keypress inserts the line break.

    But multiple P tags (empty paragraphs) are removed throughout the post, not just above or below some part of it. Same goes for multiple BR tags in a row.

    Now — I suppose I have to modify the CSS <p> behavior to force space between the paragraphs?

    When I look at your site, I see spacing between the paragraphs. But if you wanted to change that, yes, you would modify the CSS.

    WP touts itself as a “semantic” blogging platform. What that means is this:

    It tries to only put the content into the HTML. Anything that controls appearance (spacing, fonts, colors, etc) should be in the stylesheet.

    Although earlier versions of HTML allowed you to control all that stuff directly in the HTML (with <br /> and <hr />` tags and the like), current HTML standards call for removing all that from the HTML and using CSS instead.

    Technically, that means you should eliminate the <hr /> tags as well and instead use a div with a border on top. But stick with the <hr /> tags if you prefer.

    Maybe that helps.

    Looks like you need lessons in interacting with human beings too. Sort your attitude out or you’ll run into serious problems in life.

    I found your post while trying to solve the same thing. Here is what I came up with. First turn off

    WordPress should correct invalidly nested XHTML automatically

    This is found in options – writing.

    Then put a blank line (enter) then a<br/> with no spaces in it.

    Follow with another blank line, then another <br/>. Keep doing this.

    The view source looks like this several times

    <p><br/></p>

    I posted my page where I used this to seperate two articles here. Please view source to see this more clearly.
    ————–

    I also used the single.php to adjust spacing that I wanted the same every time. Just keep the <br> outside of the php statements.

    I hope this helps. I was less than impressed that I had to find a hack for this also.

    I’ve run into this problem in tables. It is not valid XHTML to include p tags within td tags but if I try to add a blank line between paragraphs in a table cell WordPress interprets that as described above and replaces the two br tags with a p tag. I tried adding a style="height:4em" to the br tag to no avail. Adding style="margin-bottom:2em" and style="padding-bottom:2em" didn’t work either.

    So how do you get a blank line in a table without using two br tags?

    Note that I’m using Windows Live Writer and it has its own HTML formatter which produces semantically correct HTML but I don’t have any control over that formatting (just in case someone says to remove the space between the br and the slash – can’t do it with Live Writer).

    Thanks,
    David

    Hmm, I guess I should have created a new post instead of trying to add on to a resolved one.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Bug in 2.3.2’ is closed to new replies.