ckeditor / ckeditor4

The best enterprise-grade WYSIWYG editor. Fully customizable with countless features and plugins.
https://ckeditor.com/ckeditor-4
Other
5.79k stars 2.47k forks source link

Unexpected <!--{cke_protected}> & <!--[if gte vml 1]> comments added #5217

Closed usmannoor10p closed 2 years ago

usmannoor10p commented 2 years ago

Type of report

Bug

Provide detailed reproduction steps

  1. Use the following sample word document: Table-image.docx
  2. After importing the above word document to Ckeditor, some of the unwanted comment <!--[if gte vml 1]> is being added to the HTML
  3. Once imported whenever I am clicking on any of the table rows this comment <!--[if gte vml 1]> is being encoded to <!--{cke_protected}> which is causing parsing issues in the HTML.
  4. How can we skip/escape this kind of unexpected comment in the Ckeditor? Is there any configuration that Ckeditor 4 has to remove them?
  5. Encoded comment HTML: Encoded-table.txt
  6. Decoded comment HTML: Decoded-table.txt

Expected result

<!--{cke_protected}> & <!--[if gte vml 1]> should not be added automatically in the HTML

Actual result

<!--{cke_protected}> & <!--[if gte vml 1]> are added in the HTML

Other details

jacekbogdanski commented 2 years ago

@usmannoor10p could you share editor configuration using one of the online editors suggested in the issue template?

I can't reproduce the issue using default, minimal editor configuration (a screencast would be also welcome, if that issue occurs when using the editor).

usmannoor10p commented 2 years ago

@jacekbogdanski thanks for your quick response. Let me try to add an example of any of the given environments. Meanwhile please go through the attached Encoded and Decoded Table files. You will be able to see the comments.

usmannoor10p commented 2 years ago

Source Code: table_cke_protected.zip

Demo: https://jsfiddle.net/x4oLjcm2/

@jacekbogdanski above is the example, in which you will be able to see the {cke_protected} tag being converted.

KarolDawidziuk commented 2 years ago

Hello, @usmannoor10p, thank you for the provided example, and sorry for the late reply.

I can't reproduce this issue, I checked the .docx file and your sample and everything looks good.

Comments were not added after I paste content from .docx file and in your provided example the comments was not replaced when I clicked on the table rows. Checked on Windows and macOS.

But I want to be sure that I fully understand your issue.

There is an issue with adding and replacing <!--[if gte vml 1]> by <!--{cke_protected}> which causes the parsing issues?

Can I ask you for a short video that will show your issue? I would like to be sure that I have not missed something.

usmannoor10p commented 2 years ago

Hey @KarolDawidziuk, thanks for taking this up. Let me share a short video as soon as possible. Also, I was going through the link that I provided earlier on jsfiddle https://jsfiddle.net/x4oLjcm2/.

Please see the screenshot below:

image

github-actions[bot] commented 2 years ago

It's been a while since we last heard from you. We are marking this issue as stale due to inactivity. Please provide the requested feedback or the issue will be closed after next 7 days.

usmannoor10p commented 2 years ago

Please check the last comment of mine. The link provided has the issue.

Comandeer commented 2 years ago

This is the internal way of representing comments inside the CKEditor instance. However, the output of the editor (e.g. via editor#getData() method) contains correct HTML.

Could you describe in more detail what exactly issue is caused by this internal representation of comments?

github-actions[bot] commented 2 years ago

It's been a while since we last heard from you. We are marking this issue as stale due to inactivity. Please provide the requested feedback or the issue will be closed after next 7 days.

github-actions[bot] commented 2 years ago

There was no activity regarding this issue in the last 14 days. We're closing it for now. Still, feel free to provide us with requested feedback so that we can reopen it.