Project

General

Profile

Actions

Bug #21485

closed

Multiple assigned classes in Text Style get lost in HTML cleaner.

Added by Schmidt Timo over 14 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2009-11-06
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

  • Open the RTE
  • Create a paragraph and apply multiple text styles to a part of the paragraph.
  • During the saving process the classes get lost even if they are allowed.
  • The same seems to work for a complete paragraph.

I've figured out that there are two problems:

In the Method HTMLparserConfig the list of allowed
tags will be overwritten with an expoded string.

Line 1256 ad 1257:

if (strcmp($keepTags[$key]['fixAttrib'][$atName]['range'],'')) $keepTags[$key]['fixAttrib'][$atName]['range'] = t3lib_div::trimExplode(',',$keepTags[$key]['fixAttrib'][$atName]['range']);
if (strcmp($keepTags[$key]['fixAttrib'][$atName]['list'],'')) $keepTags[$key]['fixAttrib'][$atName]['list'] = t3lib_div::trimExplode(',',$keepTags[$key]['fixAttrib'][$atName]['list']);

But at runtime $keepTags[$key]['fixAttrib'][$atName]['range'] contains an array, not a string. Therefor The Sting "Array" is afterwards content of $keepTags[$key]['fixAttrib'][$atName]['list'].

In my opinion we need to check first if the value is realy a string and if
not, we shouln't do anything:

Second Problem:

In the method HTMLcleaner the handling of a list need to be enhanced to allow the user to use MultipleListItems. To solve this i've introduced an configuration option "allowMultipleListItems"

(issue imported from #M12496)


Files

class.t3lib_parsehtml.php.patch (2.4 KB) class.t3lib_parsehtml.php.patch Administrator Admin, 2009-11-06 16:49

Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #22900: Span tags with multiple classes being removedClosedStanislas Rolland2010-06-16

Actions
Actions #1

Updated by Schmidt Timo over 14 years ago

Option to allow multiple css classes is:

proc.HTMLparser_db.tags.span.fixAttrib.class.allowMultipleListItems = 1

Actions #2

Updated by Stanislas Rolland over 12 years ago

  • Category set to RTE (rtehtmlarea + ckeditor)
  • Target version deleted (0)
  • TYPO3 Version set to 4.3
Actions #3

Updated by Stanislas Rolland over 12 years ago

This issue was solved in TYPO3 4.3.5 in a different way.

The class attribute is treated in a different way when the list property is used: only classes not in the specified list are removed.

See: http://forge.typo3.org/projects/typo3v4-core/repository/revisions/ce2df03d31aa70bae4971d6cb3a8260c605a0e1b

Actions #4

Updated by Stanislas Rolland over 12 years ago

  • Status changed from New to Resolved
  • Assignee set to Stanislas Rolland
Actions #5

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF