[BUGFIX] HTML entity   is inserted before and after inline element
authorStanislas Rolland <typo3@sjbr.ca>
Thu, 12 Jan 2012 23:45:39 +0000 (18:45 -0500)
committerStanislas Rolland <typo3@sjbr.ca>
Tue, 17 Jan 2012 15:54:47 +0000 (16:54 +0100)
Problem: This is a regression caused by patch to issue #16217.
The last two lines of the merged patch are wrong. They should replace
only leading and trailing spaces inside block elements.
Solution: Revert the last two replacement lines of the patch.

Change-Id: I1ed4676ab4f16e2c3593a111c3593197a63b0d7b
Resolves: #32263
Releases: 4.5, 4.6, 4.7
Reviewed-on: http://review.typo3.org/7754
Reviewed-by: Stanislas Rolland
Tested-by: Stanislas Rolland
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js

index 1384527..2a4dc9a 100644 (file)
@@ -2330,9 +2330,7 @@ HTMLArea.Editor = Ext.extend(Ext.util.Observable, {
                                return this.textArea.getValue().
                                        replace(/[\x20]+/g, '\x20').
                                        replace(/^\x20/g, '&nbsp;').
-                                       replace(/\x20$/g, '&nbsp;').
-                                       replace(/>\x20/g, '>&nbsp;').
-                                       replace(/\x20</g, '&nbsp;<');
+                                       replace(/\x20$/g, '&nbsp;');
                        default:
                                return '';
                }