[upstream] [GHS] CKEditor 5 removes <a>s that wrap HTML elements not natively supported by CKEditor 5

Created on 23 March 2023, over 1 year ago
Updated 24 August 2023, over 1 year ago

Problem/Motivation

Reported by @glynster at #3337298-12: [upstream] [GHS] CKEditor 5 removes empty inline elements :

CKeditor source view:

<div class="adblock">
  <a href="/link">
    <picture>
      <source media>
    </picture>
  </a>
</div>

CKeditor default view:

<div class="adblock">
  <picture>
    <source media="">
  </picture>
</div>

And indeed dataloss. We migrated to CKeditor 5 and just notcied all links were stripped from our adblocks.

Steps to reproduce

Copy/paste that first snippet into https://ckeditor.com/docs/ckeditor5/latest/features/html/general-html-su...'s source view
turn off source view
return to source view

The wrapping <a> is indeed lost!

Proposed resolution

Wait for https://github.com/ckeditor/ckeditor5/issues/13803 to get fixed upstream.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Fixed

Version

11.0 🔥

Component
CKEditor 5 

Last updated 2 days ago

Created by

🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

Live updates comments and jobs are added and updated live.
  • Contributed project blocker

    It denotes an issue that prevents porting of a contributed project to the stable version of Drupal due to missing APIs, regressions, and so on.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024