WordPress line breaks still broken

WordPress has an infuriating habit of removing line breaks from your HTML script.
It doesn’t matter whether you use <br /> or &nbsp: they get the chop. You can work around it by inserting this code into your editor while in HTML mode:

<div style="height: 1em; visibility: hidden;">whatever text scratches your itch</div>

I expected this to be fixed in WordPress 3 but they blew it. They’re forgiven. WordPress 3 is otherwise fantastic.

For a lot more about line breaks and padding go to this excellent WordPress Tips page.


If typing all that stuff is a trial, get yourself a text expander. My choices:

  • Free Autohotkey for Windows – reviewed here on Just Wondering.
  • Free Autokey for Linux.
  • Reasonably priced TextExpander for Mac.