ezsystems/ezpublish-legacy — pull request #834 by dpobel (2013-11-15 14:01:52+00:00)
Title: Fix EZP-21903: Copy & paste with chrome insert non break space

JIRA issue: https://jira.ez.no/browse/EZP-21903

# Description

In Chrome, when you hit space at the end of a line, it adds a non breaking space, if you type something after, TinyMCE transforms it to a normal space but this transformation does not occur if you are pasting something instead of typing. As a result, the resulting HTML might contain several non breaking spaces which might break the website layout.

This is a [TinyMCE issue](http://www.tinymce.com/develop/bugtracker_view.php?id=6483) which also affect the last versions of TinyMCE (4.0.x) and this patch is actually a more workaround to this. Unfortunately, it also creates a (very?) minor issue because when we remove the non breaking space we don't know if it was created automatically or if it was added by the user and in such case we should probably not remove it.

# Tests

manual tests in Chrome in various copy / paste scenarios.