- Issue created by @imclean
We were just running into this same issue, but with anchor tags (that use aria, javascript, and css).
Using the CKEditor demo page:
<ul> <li> example text </li> <li> <a href="https://www.example.com"> </a> <a href="https://www.drupal.org"> </a> </li> </ul>
...will remove the non-breaking space from the first link and turn it into a regular space when going back and forth in source. The HTML is kept, but the first non-breaking space is lost.
Using the same code, but without the first li that had visible text:
<ul> <li> <a href="https://www.example.com"> </a> <a href="https://www.drupal.org"> </a> </li> </ul>
...shows two spaces when you get out of source, but if you go back into source, all of the HTML is gone.
I'm seeing lots of variations of how it handles the non-breaking spaces, but in general it seems very broken and dependent on other elements within the code.
- 🇳🇿New Zealand quietone
If this problem was discovered on a version of Drupal that is not 11.x, add that information in the issue summary and leave the version at 11.x. In Drupal core changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to the Core change policies → .