Project

General

Profile

Actions

Bug #98933

closed

<figure> does not render correctly in frontend when a table is created in rte editor

Added by Urs Maag over 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
Fluid Styled Content
Target version:
-
Start date:
2022-10-26
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.1
Tags:
<figure> not rendering correctly
Complexity:
Is Regression:
Sprint Focus:

Description

On inserting a table in backend's rte editor, there is wrapping a <figure>-tag around it. By rendering this in the frontend with fluid_styled_content (with f:format.raw), the figure tag is rendered with escaped signs (e.g. &lt; and &gt;). Additional, on every save in backend, there is inserted a new line below the <figure>-tag.

I fixed the inserting new line every save in backend on adding the "figure"-tag on TYPO3\CMS\Core\Html\RteHtmlParser to the $blockElementList variable:

protected $blockElementList = 'DIV,TABLE,BLOCKQUOTE,PRE,UL,OL,H1,H2,H3,H4,H5,H6,ADDRESS,DL,DD,HEADER,SECTION,FOOTER,NAV,ARTICLE,ASIDE, FIGURE';

For correct rendering in frontend, i added the <figure>-tag to the allowed tags in typoscript:

lib.parseFunc_RTE.allowTags:=addToList(figure)
lib.parseFunc_RTE.externalBlocks:=addToList(figure)
lib.parseFunc_RTE.externalBlocks.figure.stripNL = 1


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #99273: Additional new <p> tag in case of <figure> tagClosedBenni Mack2022-12-05

Actions
Actions #1

Updated by Urs Maag over 1 year ago

  • Subject changed from <figure> does not render correctly in frontend when a table is crated in rte editor to <figure> does not render correctly in frontend when a table is created in rte editor
Actions #2

Updated by Benni Mack about 1 year ago

  • Related to Bug #99273: Additional new <p> tag in case of <figure> tag added
Actions #3

Updated by Gerrit Code Review about 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78646

Actions #4

Updated by Benni Mack about 1 year ago

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

Also available in: Atom PDF