Project

General

Profile

Actions

Bug #50414

closed

IRRE javascript title update for DB relational field: no htmlspecialchars used

Added by Tobias Klepp over 11 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2013-07-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.1
PHP Version:
5.3
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

If I defined an Inline Relational Record Editing (IRRE) in my TCA and the title of the inline table is a database relation field, it produces an HTML error, if I select an entry in the database relation field. This only happens, if I have an entry with HTML tags in the title. For example: Test&<h1>.

To demonstrate this, I have created the following example TCA configuration:

- ext_tables.php

$TCA['tx_extkey_parenttable'] = array (
'ctrl' => array (
'title' => 'LLL:EXT:extkey/locallang_db.xml:tx_extkey_parenttable',
'label' => 'title',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'sortby' => 'sorting',
'delete' => 'deleted',
'enablecolumns' => array (
'disabled' => 'hidden',
),
'searchFields' => 'title',
'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',
'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'icon_tx_extkey_parenttable.gif',
),
);

$TCA['tx_extkey_childtable'] = array (
'ctrl' => array (
'title' => 'LLL:EXT:extkey/locallang_db.xml:tx_extkey_childtable',
'label' => 'fk_relation',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'sortby' => 'sorting',
'delete' => 'deleted',
'enablecolumns' => array (
'disabled' => 'hidden',
),
'hideTable' => TRUE,
'searchFields' => 'title',
'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',
'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'icon_tx_extkey_childtable.gif',
),
);

$TCA['tx_extkey_relationtable'] = array (
'ctrl' => array (
'title' => 'LLL:EXT:extkey/locallang_db.xml:tx_extkey_relationtable',
'label' => 'title',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'sortby' => 'sorting',
'delete' => 'deleted',
'enablecolumns' => array (
'disabled' => 'hidden',
),
'searchFields' => 'title',
'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',
'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'icon_tx_extkey_relationtable.gif',
),
);

- tca.php

$TCA['tx_extkey_parenttable'] = array (
'ctrl' => $TCA['tx_extkey_parenttable']['ctrl'],
'interface' => array (
'showRecordFieldList' => 'hidden,title,fk_relation'
),
'feInterface' => $TCA['tx_extkey_parenttable']['feInterface'],
'columns' => array (
'hidden' => array (
'exclude' => 1,
'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
'config' => array (
'type' => 'check',
'default' => '0'
)
),
'title' => array (
'exclude' => 1,
'label' => 'LLL:EXT:extkey/locallang_db.xml:tx_extkey_parenttable.title',
'config' => array (
'type' => 'input',
'size' => '50',
'max' => '150',
'eval' => 'required,trim',
)
),
'fk_childs' => array (
'exclude' => 1,
'label' => 'LLL:EXT:extkey/locallang_db.xml:tx_extkey_parenttable.fk_childs',
'config' => array (
'type' => 'inline',
'foreign_table' => 'tx_extkey_childtable',
'foreign_field' => 'parentid',
'foreign_table_field' => 'parenttable',
'foreign_sortby' => 'sorting',
'minitems' => 1,
'maxitems' => 99,
)
),
),
'types' => array (
'0' => array('showitem' => 'hidden;;1;;1-1-1, title, fk_childs')
),
'palettes' => array (
'1' => array('showitem' => '')
)
);

Actions

Also available in: Atom PDF