I've found something quite similar.
When I make a table, I can specify a border size, cellpadding and cellspacing.
If a value is detected, "css_styled_content" adds it in the <table>-tag.
But the "cms" sysext doesn't allow a 0 value. It doesn't seem to be right because I don't want any of these tag attributes, I don't give any value, but if I want a value set to 0 (because of a HTML rendering quirk), I'm not allowed to.
So I've modified both "cms" and "css_styled_content" to accept a 0 value.
In /typo3/sysext/cms/tbl_tt_content.php, after line 736, I've removed the 0 value of "checkbox".
Here is the result :
'table_border' => Array (
'exclude' => 1,
'label' => 'LLL:EXT:cms/locallang_ttc.php:table_border',
'config' => Array (
'type' => 'input',
'size' => '3',
'max' => '3',
'eval' => 'int',
'checkbox' => '',
'range' => Array (
'upper' => '20',
'lower' => '0'
),
'default' => 0
)
),
'table_cellspacing' => Array (
'exclude' => 1,
'label' => 'LLL:EXT:cms/locallang_ttc.php:table_cellspacing',
'config' => Array (
'type' => 'input',
'size' => '3',
'max' => '3',
'eval' => 'int',
'checkbox' => '',
'range' => Array (
'upper' => '200',
'lower' => '0'
),
'default' => 0
)
),
'table_cellpadding' => Array (
'exclude' => 1,
'label' => 'LLL:EXT:cms/locallang_ttc.php:table_cellpadding',
'config' => Array (
'type' => 'input',
'size' => '3',
'max' => '3',
'eval' => 'int',
'checkbox' => '',
'range' => Array (
'upper' => '200',
'lower' => '0'
),
'default' => 0
)
),
In /typo3/sysext/css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php, after line 834, I've modified the condition to transform the value in integer (with the "intval" function) and checked it to be >= 0.
Here is the result :
$tableTagParams['border'] = intval($this->cObj->data['table_border']) >= 0 ? intval($this->cObj->data['table_border']) : $tableTagParams_conf['border'];
$tableTagParams['cellspacing'] = intval($this->cObj->data['table_cellspacing']) >= 0 ? intval($this->cObj->data['table_cellspacing']) : $tableTagParams_conf['cellspacing'];
$tableTagParams['cellpadding'] = intval($this->cObj->data['table_cellpadding']) >= 0 ? intval($this->cObj->data['table_cellpadding']) : $tableTagParams_conf['cellpadding'];
I've done sme testing and it's OK for me.
It'd be good to fix it in the CVS for the 4.0rc1
Thank you