How can I remove <br /> line breaks from manually formatted HTML?

I see a lot of posts here and elsewhere having trouble adding line breaks for some reason, but I’m trying to remove them. I’m new to WP, and I see that when editing in “HTML” mode the text is rendered in paragraph tags for double line breaks, and <br> for single line breaks, without the need to write the HTML. This is nice, but when I format the code manually by adding the <p> tags myself, I still get <br>s in the output. Example input in the editor:

<p>
I don't want
HTML line breaks.
</p>

My output:

Read More
<p>
I don’t want<br />
HTML line breaks.</p>

I could remove all the line breaks in the source input, but that’s really quite tedious and makes things harder to read in the editor. Is there any way to make WP ignore line breaks (not create <br>) when the content is already wrapped in <p> tags?

I’m using the defaults for everything on a new installation.

Related posts

Leave a Reply