Project

General

Profile

Actions

Bug #104617

closed

CKEditor "mark" buttons create double-encoded html <mark> tag on frontend

Added by Riccardo De Contardi 3 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2024-08-14
Due date:
% Done:

100%

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

Description

Prerequisites

- TYPO3 12.4.18
- CKEditor full preset enabled
- a page with a "Text" Content element

Steps to reproduce

- Edit the bodytext of the CE, add some text and use the buttons to create a <mark> tag inside the text (see attached file)
- Visit the page on the frontend

Result

the <mark> tag is double-encoded, so on the frontend the HTML code is actually:

lorem &lt;mark class="marker-yellow"&gt;ipsum dolor&lt;/mark&gt; sit amet 

expected result

the <mark> tag should be rendered as an actual HTML tag

Reason

That is because <mark> has not been included into lib.parseFunc_RTE.allowTags; as a workaround you
can just add it by yourself in your TypoScript setup:

lib.parseFunc_RTE.allowTags:=addToList(mark)

Bonus

As far as I have seen the CKEditor ships some predefined "markers" in the yaml file:

        - { model: 'yellowMarker', class: 'marker-yellow', title: 'Yellow marker', type: 'marker', color: 'var(--ck-highlight-marker-yellow)' }
        - { model: 'greenMarker', class: 'marker-green', title: 'Green marker', type: 'marker', color: 'var(--ck-highlight-marker-green)' }
        - { model: 'redPen', class: 'pen-red', title: 'Red pen', type: 'pen', color: 'var(--ck-highlight-pen-red)' }

but these CSS classes are not defined on the frontend; as a result, even if you choose to use for example the "Green Marker" and correct by yourself lib.parseFunc_RTE.allowTags, the marked words on the frontend would still use the default browser background color for the <mark> tag (yellow for Chrome)

Let me know if you need a separate issue for that (or if you think that the integrators are meant to take care of this)


Files

Cattura.PNG (8.99 KB) Cattura.PNG Riccardo De Contardi, 2024-08-14 07:56

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #101128: CKeditor implement bidi and language Plugin againClosed2023-06-20

Actions
Actions #1

Updated by Riccardo De Contardi 3 months ago

  • Description updated (diff)
Actions #2

Updated by Garvin Hicking 3 months ago

  • Category changed from Frontend to RTE (rtehtmlarea + ckeditor)
Actions #3

Updated by Garvin Hicking 3 months ago

  • Related to Feature #101128: CKeditor implement bidi and language Plugin again added
Actions #4

Updated by Gerrit Code Review 3 months 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/+/85639

Actions #5

Updated by Gerrit Code Review 3 months ago

Patch set 2 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/+/85639

Actions #6

Updated by Gerrit Code Review 3 months ago

Patch set 3 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/+/85639

Actions #7

Updated by Gerrit Code Review 3 months ago

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

Actions #8

Updated by Gerrit Code Review 3 months ago

Patch set 4 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/+/85639

Actions #9

Updated by Gerrit Code Review 3 months ago

Patch set 5 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/+/85639

Actions #10

Updated by Gerrit Code Review 3 months ago

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

Actions #11

Updated by Gerrit Code Review 3 months ago

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

Actions #12

Updated by Gerrit Code Review 3 months ago

Patch set 6 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/+/85639

Actions #13

Updated by Gerrit Code Review 3 months ago

Patch set 7 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/+/85639

Actions #14

Updated by Gerrit Code Review 3 months ago

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

Actions #15

Updated by Garvin Hicking 3 months ago

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

Updated by Benni Mack about 1 month ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF