Bug #24186

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

Added by Arjan Zijderveld over 8 years ago. Updated 10 months ago.

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

100%

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

Related to TYPO3 Core - Bug #22900: Span tags with multiple classes being removed Closed 2010-06-16

Associated revisions

Revision b34b66be (diff)
Added by Frederic Gaus almost 4 years ago

[!!!][BUGFIX] Assign first class for tables in HTMLparser

When the given class of a table is not valid by configuration,
the HTMLparser should assign the first class in configuration instead
of generating an empty class attribute.

Releases: master
Resolves: #24186
Change-Id: Ia57c036aaf81973e8d7fe26861c78de217013c75
Reviewed-on: http://review.typo3.org/39349
Reviewed-by: Daniel Goerz <>
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>

History

#1 Updated by Alexander Opitz over 5 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)
  • Is Regression set to No

Hi,

as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (4.5 or 6.1)?

#2 Updated by Christian Kuhn over 5 years ago

imho still valid, had this too on a 4.5 instance.

#3 Updated by Alexander Opitz over 5 years ago

  • Status changed from Needs Feedback to New

#4 Updated by Riccardo De Contardi about 4 years ago

still present in TYPO3 6.2.12

#5 Updated by Riccardo De Contardi about 4 years ago

  • TYPO3 Version changed from 4.4 to 6.2

#6 Updated by Gerrit Code Review about 4 years ago

  • Status changed from New to Under Review

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39349

#7 Updated by Gerrit Code Review about 4 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39349

#8 Updated by Gerrit Code Review about 4 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39349

#9 Updated by Gerrit Code Review about 4 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39349

#10 Updated by Gerrit Code Review almost 4 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39349

#11 Updated by Frederic Gaus almost 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#12 Updated by Benni Mack 10 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF