90938[BUGFIX] Fix unlinking of anchors to hidden or deleted pages in RTE
Commit message
Review
-
Code review CR +2 Done
- Benjamin Franzke +2
- Andreas Nedbal +1
- Garvin Hicking +1
-
Verified V +2 Done
- Benjamin Franzke +2
- Andreas Nedbal +1
- Garvin Hicking +1
- core-ci +1 CI
Issues 1
Files 2
Review log 78
-
Benjamin Franzke uploaded patch set 1 10/07/25, 08:59
-
core-ci voted on patch set 1 V +1 10/07/25, 09:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86139
-
Garvin Hicking commented on patch set 1 CR +1 V +1 10/07/25, 09:39
-
Benjamin Franzke commented on patch set 1 10/07/25, 13:05
typo3-link.ts:257ReplySuch custom attributes are to be allowed via Generic HTML Support (GHS): https://ckeditor.com/docs/ckeditor5/latest/features/html/general-html-support.html E.g. ``` editor: config: htmlSupport: allow: - name: 'a' attributes: data-foo: true ``` Then those data attributes are collected in a generic `htmlA` link attribute (can be diagnosed via the CKEditor inspector), which is automatically removed when `linkHref` attribute is removed because it is coupled to this attribute, see: https://github.com/ckeditor/ckeditor5/blob/cf03068f77ea093ea60b60155687af8215a5c72d/packages/ckeditor5-html-support/src/schemadefinitions.ts#L704 `data-rte-error` is special, since it is not registered via GHS, but as a custom link attribute within our link plugin, therefore this attribute needs to be removed explicitly. Ideally all our custom link attributes would be coupled to `linkHref`, so that ` writer.removeAttribute('linkHref, range)` would remove all link attributes automatically, but I didn't look intro rewriting that part yet. TL;DR other data-* attributes – if allowed to be used – can be removed during unlinking. -
Garvin Hicking commented on patch set 1 10/07/25, 13:22
typo3-link.ts:257ReplyOh no I didn't want to chase you through a rabbit hole. Thanks for this research, that sounds good to go to me. -
Andreas Nedbal voted on patch set 1 CR +1 V +1 11/13/25, 14:14
-
Benjamin Franzke voted on patch set 1 CR +2 V +2 11/13/25, 14:25
-
Benjamin Franzke merged patch set 2 11/13/25, 14:37
typo3-link.ts:257