* Fixed bug #8009: Wrong TS-Code because appendString cannot handle multiline strings
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_tsparser.php
index aca4367..cb41644 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2007 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 1999-2008 Kasper Skaarhoj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -256,6 +256,12 @@ class t3lib_TSparser {
                                                                        $tsFuncArg = $match[2];
                                                                        list ($currentValue) = $this->getVal($objStrName,$setup);
 
+                                                                       $tsFuncArg = str_replace(
+                                                                               array('\\\\', '\n','\t'),
+                                                                               array('\\', chr(10),chr(9)),
+                                                                               $tsFuncArg
+                                                                       );
+
                                                                        switch ($tsFunc)        {
                                                                                case 'prependString':
                                                                                        $newValue = $tsFuncArg . $currentValue;