[BUGFIX] t3editor not visible with TYPO3 on Windows
authorJigal van Hemert <jigal@xs4all.nl>
Mon, 19 Sep 2011 11:51:31 +0000 (13:51 +0200)
committerTobias Liebig <mail_typo3.org@etobi.de>
Mon, 19 Sep 2011 20:14:02 +0000 (22:14 +0200)
The template for t3editor contains CRLF line endings on Windows systems. To
prevent JS errors and to make the t3editor visible the CR parts of the line
endings must be removed.

Change-Id: I6e4e7d3b7045c1327f79300874f1539e407f77a5
Fixes: #30026
Branches: 4.5
Reviewed-on: http://review.typo3.org/5069
Reviewed-by: Tobias Liebig
Tested-by: Tobias Liebig
typo3/sysext/t3editor/classes/class.tx_t3editor.php

index 0329efb..707c9b8 100644 (file)
@@ -218,7 +218,11 @@ class tx_t3editor implements t3lib_Singleton {
                        )
                );
                $T3Editor_template = addslashes($T3Editor_template);
-               $T3Editor_template = str_replace(LF, "' + '", $T3Editor_template);
+               $T3Editor_template = str_replace(
+                       array(CR, LF),
+                       array('', "' + '"),
+                       $T3Editor_template
+               );
 
                return '\'' . $T3Editor_template . '\'';
        }