Why does WordPress changes the text of my posts?

  • Unknown's avatar

    This is a post I’ve written as an example:
    http://rybackhqtemp.wordpress.com/2006/09/06/change/
    The text I’ve tried to write was:

    Bla, bla, bla, bla<br/>
    Bla, bla, bla, bla<br/>
    Bla, bla, bla, bla,

    The text editor changes the “<br/>” to “<br>” when I save the post, but that is not what WordPress writes as the post’s code when I look at the source code of the blog that WP has written. It has changed into this:

    < p >Bla, bla, bla, bla< p />
    < p >Bla, bla, bla, bla< p />
    < p >Bla, bla, bla, bla
    < p >

    WHY? I don’t want WP to do that. How can I do it?

  • Unknown's avatar

    if you turn off the rich text editor it never messes with your html edits. but it’s less convenient for those who are used to it as the non-rich editor is not so.. well, rich? lol

  • Unknown's avatar

    I turned off the rich text editor. I’ve unchecked the option “WordPress should correct invalidly nested XHTML automatically”, but WP still changes the posts.

    It’s very curious, because if I edit the post, only the “<br/>” has changed into “<br>”, but not into “< p >”. WP must put the “< p >” when it creates the page, but not when it saves the post into the DB.

    It’s good that WP corrects your text to try to make it cool enough for W3C, but I should have de possibility to choice if I want WP to do it or not.

  • Unknown's avatar

    Not sure if you’re doing this but IIRC there’s suppose to be a space between the br and the ‘/’ mark.

    At least that’s the way I learned how to do it when someone pointed it out to me. I’ve always just done the br tag.

  • Unknown's avatar

    I don’t put this space, but the W3C Markup Validation Service never gave me problems with that. It’s true that with the space the editor doesn’t change the <br />, but WP still changes it for <br/>.

    I supose there’s no way to avoid it, right?

  • Unknown's avatar

    Sorry, WP changes the < br / > (with space before “/”) and puts a < p >. I put the spaces because of the editor. I hope people to understand.

  • Unknown's avatar

    Hasn’t done that for me. I use the <br /> tag all the time with the normal text editor, not the rich one.

  • Unknown's avatar

    Well, if you use < br / > WP changes the final code in your blog (http://tdjc.be/) too because I only see the < p > label in it. Look at the final source code that your browser recieves when it loads any page.

  • The topic ‘Why does WordPress changes the text of my posts?’ is closed to new replies.