CKEditor 5 change html source code despite disable html tag restriction

Created on 8 August 2023, over 1 year ago
Updated 9 August 2023, over 1 year ago

Problem/Motivation

Hi,

After the migration of CKEditor from 4 to 5, html code source change on save or switching from/to source mode.
The format filter is configure without html restrictions.

Steps to reproduce

  1. Activate CKeditor 5 and configure a text format to use it
  2. Deactivate HTML restriction for this format
  3. Create/update a content contain a field with this one and add this following code
<p>
    This is a paragraph.
</p>
<script>
<!--//--><![CDATA[// ><!--

<!--//--><![CDATA[// ><!--

const x = 0;

//--><!]]]]><![CDATA[>

//--><!]]>
</script>

That code become :

<p>
    This is a paragraph.
</p>
<script>
&lt;!--//--&gt;&lt;![CDATA[// &gt;&lt;!--
&lt;!--//--&gt;&lt;![CDATA[// &gt;&lt;!--
const x = 0;
//--&gt;&lt;!]]]]&gt;&lt;![CDATA[&gt;
//--&gt;&lt;!]]&gt;
</script>

Thank you for your help :)

🐛 Bug report
Status

Closed: duplicate

Version

9.5

Component
CKEditor 5 

Last updated 1 day ago

Created by

🇫🇷France papajo

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024