Bug #104617
closedCKEditor "mark" buttons create double-encoded html <mark> tag on frontend
100%
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 <mark class="marker-yellow">ipsum dolor</mark> 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
Updated by Garvin Hicking 3 months ago
- Category changed from Frontend to RTE (rtehtmlarea + ckeditor)
Updated by Garvin Hicking 3 months ago
- Related to Feature #101128: CKeditor implement bidi and language Plugin again added
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
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
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
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
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
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
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
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
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
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
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
Updated by Garvin Hicking 3 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 00fedf36b217012a61daa3a156a83d2e19799bd5.