Project

General

Profile

Actions

Bug #46751

closed

HTMLparser - fixAttrib.['class'].list does not assign value

Added by Arno Burkhart over 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Must have
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2013-03-28
Due date:
% Done:

0%

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

Description

Our TYPO3 configuration has the following setup:

lib.parseFunc_RTE.externalBlocks.table.stdWrap.HTMLparser.tags.table.fixAttrib.class.list = width-100

But if the author assigns any class to the table tag in the RTE the result is an empty class attribute in the frontend:
<table class=" ">

In class HtmlParser on line 828 the class attribute is emptied
$tagAttrib[0][$attr] = '';

but should not, accoording to the TSref HTMLparser_tags fixAttrib.[attribute].list:
http://typo3.org/documentation/document-library/core-documentation/doc_core_tsref/4.7.0/view/1/5/#id1555850documentation

In my opinion it has to be

$tagAttrib[0][$attr] = implode(' ', $params['list']).' '.implode(' ', $classes);

which ensures that the values ​​are assigned to the class attribute additionally.

Actions #1

Updated by Stanislas Rolland over 11 years ago

The documentation reads "Attribute value must be in this list. If not, the value is set to the first element."

So, should it not be:

$tagAttrib0[$attr] = $params['list']0;

?

Actions #2

Updated by Stanislas Rolland almost 11 years ago

  • Status changed from New to Needs Feedback

I think this is a misundertanding.

Your setup specifies that any class assigned to a table tag must be in the list.

Since you have only class "width-100" in your list, any other class will be removed.

There is currently no option of the html parser that would "add" a list of classes to the attribute value.

Actions #3

Updated by Arno Burkhart almost 11 years ago

Ok, you are right. It was a misunderstanding of the TSref documentation.

Maybe there will be such an option in future versions. That would make it possible to set a class to a HTML element for content editors in RTE and set additional a global class for administrtors via TS. Which would be nice.

Actions #4

Updated by Stanislas Rolland almost 11 years ago

  • Status changed from Needs Feedback to Closed
  • Assignee set to Stanislas Rolland

Arno Burkhart wrote:

Ok, you are right. It was a misunderstanding of the TSref documentation.

Maybe there will be such an option in future versions. That would make it possible to set a class to a HTML element for content editors in RTE and set additional a global class for administrtors via TS. Which would be nice.

You may submit a feature request as a separate issue in this bugtracker.

Actions

Also available in: Atom PDF