Problem/Motivation

The site administrators are using the CKEditor 5 FULL HTML text format to provide custom stylings using tags with the source editing. But when the css is used with the '>' syntax, ex:

<style type="text/css">
.sections > h2 {
</style>

the > symbol (the child combinator selector: https://developer.mozilla.org/en-US/docs/Web/CSS/Child_combinator) gets replaced into html entities and shown as

<style type="text/css">
.sections &gt; h2 {
</style>

This is checked with the latest 10.1.5 version. We checked by unchecking the filter "Correct faulty and chopped off HTML" filter but still able to reproduce this issue.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

ramprassad created an issue. See original summary.

ramprassad’s picture

Issue summary: View changes
ramprassad’s picture

Issue summary: View changes
tkim49’s picture

Hi, we are experiencing the same on our site. Any help would be greatly appreciated. Thanks.

amietpatial’s picture

I am also able to reproduce this issue on 10.1.6

cilefen’s picture

Component: ckeditor.module » ckeditor5.module
wim leers’s picture

Title: CKEditor 5 + Full HTML text format converts special characters to HTML entities » CKEditor 5 + Full HTML prevents the child combinator CSS selector to be used in <style>
Priority: Normal » Minor
Issue summary: View changes
Issue tags: +Needs tests
Related issues: +#3342874: Allow inline HTML comments in CKEditor 5

Wow, that's quite the edge case-y advanced use case 😅

ramprassad’s picture

There is a patch available for this now in this issue https://www.drupal.org/project/drupal/issues/3364884 . This worked for me!

wim leers’s picture

Riiiight! I knew I'd seen something like this before, but I failed to connect the dots — thank you so much, @ramprassad!

Closing this issue as a duplicate, moving relevant info there and crediting you 😊