Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Upgrading SilverStripe /

Ask questions about upgrading SilverStripe to the latest version.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Upgrading to 2.4.1 results in 
 in HTML code


Go to End


10 Posts   5470 Views

Avatar
Ingo

Forum Moderator, 801 Posts

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.

Avatar
Sean

Forum Moderator, 922 Posts

13 October 2010 at 12:43am

Subsequent fix applied here which is more portable: http://open.silverstripe.org/changeset/111949/modules
Also added a brief comment describing this change, and why it's necessary in HTMLValue.

Previously this broke on Windows (ironically), now this works on UNIX based operating systems as well as Windows through passing unit tests.

Cheers,
Sean

Go to Top