Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is similar to #2808907: Empty paragraphs after drupal-entity tag upcast and #2448449: CKEditor Widgets upcasting causes empty paragraph tags to be inserted.
In a block I entered an svg object like this:
<svg class="icon-svg" height="200" width="200">
<use xlink:href="/themes/mytheme/images/svg-defs.svg?v=1.0#icon-name"></use>
</svg>
Every time the CKEditor is loaded, the number of paragraphs (<p> </p>
) contained in the text area is doubled or so. I can reproduce it by simply clicking on "source code" in the editor to turn it off and then back on. Obviously, there shouldn't be any empty paragraphs added automatically.
Comments
Comment #2
yan CreditAttribution: yan as a volunteer commentedI just noticed that this does NOT happen when the SVG is wrapped into a div container:
Comment #3
Wim LeersReproduced. This is a bug in CKEditor. Reported: https://github.com/ckeditor/ckeditor-dev/issues/1410.
Comment #6
pameeela CreditAttribution: pameeela commentedI can't reproduce this in 9.2.x, even though the upstream bug is not fixed. Using the steps provided:
No empty p tags were created.
If anyone has updated steps to reproduce this please add them to the issue summary and re-open this issue.