12 October 2010 at 7:55am
Thanks for tracking this down Marcus - it seems to be fairly isolated to the HTMLValue class, so at least we don't have to start debugging TinyMCE. TinyMCE has a remove_linebreaks option by the way, but we shouldn't make assumptions about the editing frontend from within HTMLValue. The DOMDocument API doesn't seem to have any options to control this behaviour ("preserveWhiteSpace" doesn't seem to have an effect on this).
I've committed your fix in http://open.silverstripe.org/changeset/111878, including a basic unit test to validate the behaviour.