[BUGFIX] FormEngine: Do not add <br> to readonly textarea content 72/51372/2
authorMarkus Klein <markus.klein@typo3.org>
Fri, 20 Jan 2017 14:57:12 +0000 (15:57 +0100)
committerBenni Mack <benni@typo3.org>
Mon, 23 Jan 2017 06:58:00 +0000 (07:58 +0100)
Multiline content is displayed in a textarea "as is" by the browser.
There is no need to add <br> tags.

Resolves: #79399
Releases: master, 7.6
Change-Id: Ia628457231a15318dff4fe36f5d3cd3d990d7dc7
Reviewed-on: https://review.typo3.org/51372
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/backend/Classes/Form/Element/NoneElement.php

index f081825..5ec92b9 100644 (file)
@@ -45,9 +45,6 @@ class NoneElement extends AbstractFormElement
         $rows = (int)$config['rows'];
         // Render as textarea
         if ($rows > 1 || $config['type'] === 'text') {
-            if (!$config['pass_content']) {
-                $itemValue = nl2br($itemValue);
-            }
             $cols = MathUtility::forceIntegerInRange($config['cols'] ?: $this->defaultInputWidth, 5, $this->maxInputWidth);
             $width = $this->formMaxWidth($cols);
             $html = '