Project

General

Profile

Actions

Bug #53893

closed

Editing of included TypoScript file content via Backend results in wrong line endings (CRLF)

Added by Benjamin Robinson almost 11 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
Start date:
2013-11-22
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

If an included TypoScript-file is edited in the Backend (Template -> Info/Modify -> Setup) the line breaks will be saved as CRLF. In accordance with the Coding Guidelines LF should always be used.

Precondition: t3editor (Editor with syntax highlighting) is NOT installed. The use of t3editor seems to solve this issue, but has other issues like converting tablulators to spaces.

How to reproduce the issue:
  • Create a new textfile "fileadmin/setup.ts" via Filelist
  • Include this in the Setup of a new Template:
    <INCLUDE_TYPOSCRIPT: source="FILE: fileadmin/setup.ts">
  • Select the "Include TypoScript file content" option
  • Enter some content (manual):
    page = PAGE
    page{
        10 = TEXT
        10.value = Hello World!
    }
  • Save
  • View the file with a Texteditor that can display line endings (f.e. Notepad++)

The problem may be that the Browser (Firefox 25.0.1, OS X, in my case) sends the <textarea>-content with CRLF.
A solution could be to convert all CRLF to LF before writing to the file.

Interesting discussion about how browsers send textarea-content: http://stackoverflow.com/questions/6324167/do-browsers-send-r-n-or-n-or-does-it-depend-on-the-browser


Files

editor-screenshot.png (10.4 KB) editor-screenshot.png Benjamin Robinson, 2013-11-22 22:11

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #56630: INCLUDE_TYPOSCRIPT: Number of rows increases with each load/saveClosed2014-03-06

Actions
Actions

Also available in: Atom PDF