[BUGFIX] TypoScript: Unify line-endings to LF on save
[Packages/TYPO3.CMS.git] / typo3 / sysext / t3editor / Classes / Hook / TypoScriptTemplateInfoHook.php
index 01be093..b0ac47b 100644 (file)
@@ -119,13 +119,12 @@ class TypoScriptTemplateInfoHook {
                                                foreach ($POST['data'] as $field => $val) {
                                                        switch ($field) {
                                                                case 'constants':
-
                                                                case 'config':
-
+                                                                       // Replace Windows- and Mac linebreaks
+                                                                       $val = str_replace(array(CRLF, CR), LF, $val);
+                                                                       // intended fallthrough
                                                                case 'title':
-
                                                                case 'sitetitle':
-
                                                                case 'description':
                                                                        $recData['sys_template'][$saveId][$field] = $val;
                                                                        break;