• Resolved kingofmycastle

    (@kingofmycastle)


    I’ve been having trouble when editing posts and then seeing my line breaks disappear on the website.

    I’ve been using shift/enter to put in line breaks and normal enter for new paragraph. And when I go in to edit the post my <br />‘s are gone and now replaced by <p> tags!

    After searching around I’ve done two things that have solved the issue. Firstly I editted wp-includes/formatting.php and commented out line 60:
    //$text = str_replace('<br />', '', $text); * Hack by John King

    Then I editted wp-includes/js/tinymce/tiny_mce_config.php and changed the value of line 158 to:
    ‘remove_linebreaks’ => false,

    Now my <br /> line breaks have been retained on the blog post, yay! The only issue is that when you edit the post it appears that the <p> tags have been put in as the line breaks take up a whole blank line. Don’t worry though, if you look in the ‘code’ view you’ll see those <br /> puppies are still there.

    I hope I helped somebody else out here.

    http://www.kingofmycastle.com

  • The topic ‘Edit turning <br /> line breaks into <p> paragraph tags – solution!’ is closed to new replies.