• Hi,

    this is a frustration I’ve had with WP since day 1,
    when creating or editing posts, WP strips out line breaks
    using “br” tag for line -breaks…
    and empty paragraph tags <p>..</p>.

    I need these empty lines to properly visually present my posts.
    It’s really incomprehensible to me why this was coded this way in the first place.

    I googled a hack for it, but it’s for an older version. I’m running 2.8.5.

    Thanks for any hacks or help.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Use the HTML tab – not the Visual tab – if you want to insert your own markup. If you switch back to the Visual tab on any such post, you risk losing all of your inserted markup.

    Thread Starter tbulb

    (@tbulb)

    thanks esmi, too bad you can’t switch back and forth. a shame that wp’s “processing” removes what is essential to formatting. such a no-brainer. this should be an option, not a forced thing.

    Thread Starter tbulb

    (@tbulb)

    are there no effective PHP hacks or mod’s that will nuke WP’s annoying stripping out of line breaks?

    In WP 2.9, this is breaking in the HTML tab, too.

    I’m using WP 2.9 and find this behavior absolutely maddening. It’s 2010 – I thought we had line feeds figured out but apparently I’m mistaken. I’m using all the br and p tags I’d care to after I’ve embedded a video between div tags (used to center it) and I can’t get a line feed between my videos and the text below (even when using just the HTML tab) it which looks horrible. Why does wordpress think it knows better than I how I’d like my pages to look? If anyone knows a workaround for this glaring misfeature please do share with the rest of us.

    i’m with wfrancis!
    i posted a topic about this last night and someone was like “did you search the forum”
    and now i’m searching the forum and seeing lots of people with this problem. but i’m not finding solutions that work.

    <p>&nbsp;</p>

    seems to be a work around for a line feed. I can only assume that the coders for wordpress have noticed the outcry from people who really would like a linefeed and the coders have what they believe is sane, rational reason for stripping them out. If anyone is aware of a link to their rational I’d really like to read it because I’ve attempted to think from their point of view and I’m having a hard time understanding the case where striping out clear intent from the user is a good idea.

    I don’t know if this applies to you, but I was having this problem and it turned out to be the theme I was using. I switched themes and the problem is fixed.

    Hi,

    I see your problem. We had a very similar issue in few of our previous projects in MULTIDOTS. WordPress will trim all the p and br tags from the content, that’s weird I know.

    We have fixed the problem by using this plugin. I am sure this will be fit to your needs.

    https://www.ads-software.com/extend/plugins/tinymce-advanced/

    Once you will install this plugin, under settings of the TinyMCE Advanced you will find an options where you can stop removing this.

    Stop removing the P and BR tags when saving and show them in the HTML editor.

    Let me know if this works.

    You can do it using
    <code> </code> (make sure that you’re in HTML mode)

    I had a form in a WP post that was putting each INPUT type beside one another, since the P tag didn’t work, nor did the BR tag. I put the code above between each INPUT type and tada…

    Hope this helps

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘wp strips out line-breaks and <p> tags…’ is closed to new replies.