Actions
Bug #98933
closed<figure> does not render correctly in frontend when a table is created in rte editor
Status:
Closed
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. < and >). 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
Actions