[BUGFIX] HTML entity   is inserted before and after inline element
authorStanislas Rolland <typo3@sjbr.ca>
Tue, 17 Jan 2012 23:24:58 +0000 (18:24 -0500)
committerStanislas Rolland <typo3@sjbr.ca>
Tue, 17 Jan 2012 23:26:18 +0000 (00:26 +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: I94008b281bbe13189948862eda626264d0895ab1
Resolves: #32263
Releases: 4.5, 4.6, 4.7
Reviewed-on: http://review.typo3.org/7838
Reviewed-by: Stanislas Rolland
Tested-by: Stanislas Rolland
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js

index ecb8a0b..ba7d34c 100644 (file)
@@ -2237,9 +2237,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 '';
                }