Bug #77178
closedTCA type='text' with 'readOnly'=true renders newlines as <br /> tags
0%
Description
Hi,
As outlined in a title, the problem is with readOnly
state of textareas in TCA.
TCA without readOnly
'comment' => [ 'exclude' => 0, 'label' => 'Coment', 'config' => [ 'type' => 'text', ], ]
renders such a picture:
TCA with readOnly
TRUE
'comment' => [ 'exclude' => 0, 'label' => 'Coment', 'config' => [ 'type' => 'text', 'readOnly' => true ], ]
renders like this:
In case #32412 is implemented, this may lead to funny results on save of form with readOnly textares.
TYPO3 7.6.9
Files
Updated by Dennis Römmich about 8 years ago
Actually there is an option called 'pass_content'
'comment' => [ 'exclude' => 0, 'label' => 'Coment', 'config' => [ 'type' => 'text', 'readOnly' => true, 'pass_content' => true ], ]
which prevents textareas acting like this.
The questions are: For what reason does this option exist? And is it possible to inject xss when I use it?
Updated by Viktor Livakivskyi about 8 years ago
Dennis, thank you for the tip.
Funny, that pass_content
option shoudl only be available to type "none", according to documentation
So, not sure is it another bug or documentation is not up to date.
Updated by Riccardo De Contardi about 7 years ago
I guess documentation is correct; as far as I can see pass_content should be available only for type="none"
(see sysext\backend\Classes\Form\Element\NoneElement.php)
Updated by Georg Ringer over 4 years ago
- File Bildschirmfoto 2020-03-04 um 15.18.24.png Bildschirmfoto 2020-03-04 um 15.18.24.png added
- File Bildschirmfoto 2020-03-04 um 15.18.40.png Bildschirmfoto 2020-03-04 um 15.18.40.png added
- Status changed from New to Closed
I can't reproduce this on master and closing this