Project

General

Profile

Actions

Bug #24186

closed

HTMLparser - fixAttrib.['class'].list does not assign first element, when attribute value not in list

Added by Arjan Zijderveld almost 14 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-11-23
Due date:
% Done:

100%

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

Description

I have the following configuration:

lib.parseFunc_RTE.externalBlocks.table.stdWrap.HTMLparser.tags.table.fixAttrib.class.list = contenttable, sofa1, sofa2, sofa3, sofa4

When a table has a class not in the list above, the result is not 'contenttable' as expected, but an empty class.

In class.t3lib_parsehtml.php line 827 the current code is:

if (count($newClasses)) {
$tagAttrib0[$attr] = implode(' ', $newClasses);
} else {
$tagAttrib0[$attr] = '';
}

I think that has to be:

if (count($newClasses)) {
$tagAttrib0[$attr] = implode(' ', $newClasses);
} else {
$tagAttrib0[$attr]=$params['list']0;
}

(issue imported from #M16542)


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #22900: Span tags with multiple classes being removedClosedStanislas Rolland2010-06-16

Actions
Actions

Also available in: Atom PDF