Does wordpress TinyMCE editor removes line breaks? Fix it…

Does the wordpress TinyMCE editor removes line breaks in your posts? Yes this is a bug in wordpress TinyMCE editor and we are forced to live with this bug.Are you annoyed at the fact that wordpress removes line breaks from your posts.Here is the solution to your miseries.

Stop wordpress TinyMCE editor from removing line breaks:

To fix this annoying wordpress bug, open wp-includes/formatting.php, and change line 402 to this:

$content = str_replace('', '
', $content);

Alternately, you can use <br clear=”none”/>.

This code fix stops or prevents wordpress TinyMCE editor from removing line breaks.

3 comments on “Does wordpress TinyMCE editor removes line breaks? Fix it…

  1. Hi,
    Thanks for this great tip, any solution to stop stripping out other tags ,… by WP editor?

  2. This doesn’t work any more with newer versions of WordPress.

  3. Yes I guess it is no longer needed as I am also not facing any issues in wordpress 2.7. This post was made for a much earlier version of wordpress.

Leave a Reply

Your email address will not be published. Required fields are marked *

*