[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 18:17:23 +0000 (20:17 +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: If4f126c46ab243e616292a60563ebe4bea3fd624
Fixes: #30026
Branches: 4.6
Reviewed-on: http://review.typo3.org/5058
Reviewed-by: Oliver Hader
Reviewed-by: Tobias Liebig
Tested-by: Tobias Liebig
typo3/sysext/t3editor/classes/class.tx_t3editor.php

index 46f4f0b..b9b03ce 100644 (file)
@@ -224,7 +224,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 . '\'';
        }