Actions
Bug #53893
closedEditing of included TypoScript file content via Backend results in wrong line endings (CRLF)
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
Actions