Bug #78705

RTE converts spaces into nbsp before/after ul, ol in table cells

Added by Piotr Łojewski almost 3 years ago. Updated over 1 year ago.

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

0%

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

Description

When I've got code like this:

<table><tr><td><ul><li>Item</li><li>Item</li><li>Item</li></ul></td></tr></table>

it works fine until I switch to HTML or disable rte at all and add spaces before and after ul, ol (or it is added by TinyMCE when is enabled):

<table><tr><td> <ul><li>Item</li><li>Item</li><li>Item</li></ul> </td></tr></table>

it converts in FE into code like this:

<table>
  <tr>
      <td>
         &nbsp;
         <ul>
            <li>Item</li>
            <li>Item</li>
            <li>Item</li>
         </ul>
         &nbsp;
      </td>
   </tr>
</table>

Have you got any idea please?

This works the same in 7.6.

nbsp_in_table.PNG View (12.5 KB) Joe Jones, 2018-04-12 11:19

History

#1 Updated by Riccardo De Contardi over 2 years ago

This still happens on 7.6.16 with RTEHtmlarea and even on 8.7-dev (latest master) with CKEditor.

Test procedure:

1) create a new "Text and Medie CE"
2) click on RTE
3) click the "toggle text mode" button ("Source" button on CKEditor)
4) insert the code:

<table><tr><td><ul><li>Item</li><li>Item</li><li>Item</li></ul></td></tr></table>

5) Save
6) click again the "toggle text mode" button
7) add the spaces:

<table><tr><td> <ul><li>Item</li><li>Item</li><li>Item</li></ul> </td></tr></table>

8) save again and preview page

Result:

  added instead of the spaces, but only in frontend. The   are still absent if you look at the code in the backend RTE

#2 Updated by Mathias Schreiber about 2 years ago

  • Status changed from New to Closed

HTMLArea is no longer supported by TYPO3.
You can open up new issues here https://github.com/FriendsOfTYPO3/rtehtmlarea.

Cheers
Mathias

#3 Updated by Joe Jones over 1 year ago

Hallo Mathias,

Same problem here. Building a structure table with ul, nbsp is added in the frontend before and after <ul></ul>. I can't find a way to pretend. It happens in the ckeditor in TYPO 8.7.12. I tried the ckeditor config by adding:

editor:

    config:

        fillEmptyBlocks: false
        tabSpaces: 0
        forcePasteAsPlainText: true
        entities_additional: ''

Did not change anything. I will remove the nbsp via javascript. No good way.

See attachment.

Thank you
Martin

Also available in: Atom PDF