Account created on 13 December 2014, over 10 years ago
#

Recent comments

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">&nbsp;</a>&nbsp;<a href="https://www.drupal.org">&nbsp;</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">&nbsp;</a>&nbsp;<a href="https://www.drupal.org">&nbsp;</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.

Production build 0.71.5 2024