Double <br> converted to <p> in wordpress editor admin

in my wordpress 3.9.0 installation, I have some problems regarding the formatting of the text the admin users enter. The default behavior is that it removes <p> tags and <br> tags when switching betweeen HTML and text mode. I found some old questions that hinted to install the Tinymce advanced plugin, which I did.

So, at this point, the text enters the database exactly (I verified this in phpmyadmin) as I want it. If it has double <br>, it keeps the double <br>. Also, when the text is displayed to a visitor, the double <br> stays a double <br>.

Read More

However, when I reload the text into the editor, every double <br> is converted to a <p> tag. This is extermely annoying. I tried numerous plugins, also changed the tinymce configuration file with the remove_linebreaks , convert_newlines_to_brs and remove_redundant_brs options to no avail.

I am quite sure wordpress sends the database content through some filters, however I have no idea which ones they are. For the frontend, I could use

remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );

but this has no effect on the admin part.

Thank you,
Digits

Related posts

Leave a Reply

1 comment