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.48k forks source link

Issue with Exporting Content edited in CKEditor (e.g. Special Characters): New Special Characters are added beyond what is typed/edited in CKEditor #4552

Closed davis-03 closed 3 years ago

davis-03 commented 3 years ago

Type of report

Bug

Provide detailed reproduction steps (if any)

  1. Special characters are typed into CKEditor plug-in used within SAP SuccessFactors Job Profile Builder (JPB)
  2. For example: "Cette phrase est écrite en français" is typed into the CKEditor
  3. Upon export from the CKEditor within JPB, the output reveals "Cette phrase est &eacture;crite en français" instead of the expected "Cette phrase est écrite en français"

Note: upon further testing we have found the issue is not with new imports which are immediately exported, without edit. Thus the issue appears to be after content is typed (net-new) or imported, then edited, with the CKEditor We recognize this likely pinpoints the issue as being with CKEditor versus SAP SuccessFactors functionality and/or the file import process.

Expected result

What is the expected result of the above steps? The expected result is to see only the special characters imported and/or edited directly in CKEditor. Here - the expected export results would be "Cette phrase est écrite en français"

Actual result

What is the actual result of the above steps? The actual result is to see additional the special characters beyond that which is imported/or edited directly in CKEditor. Here - the actual export results are "Cette phrase est &eacture;crite en f r a n & c c e d i l ; a i s"

^we had to space out the actual results for handling the 'ç' special character as the Github editor was correcting the error!! Exactly the issue we want to solve!

Other details

davis-03 commented 3 years ago

Please see the below screenshots for the expected versus actual results - you will see the extra characters included

Davis

Screen Shot 2021-03-01 at 1 14 35 PM

Screen Shot 2021-03-01 at 1 13 51 PM

davis-03 commented 3 years ago

What we are finding after additional testing today (March 1, 2021): The issue does appear to be with the edit function within CKEditor - we found multiple times that the clean import and immediate export (with no edits, typed characters, or changes) produces the correct or expected results. The only issues appear to arise when text is typed net-new or edited within the CKEditor

Davis

Dumluregn commented 3 years ago

Hello, CKEditor 4 by default replaces custom characters with HTML entities to avoid encoding issue during saving and loading data from database. This behaviour can be easily changed by config.entities option - set it to false and special characters should no longer be replaced.

davis-03 commented 3 years ago

Hi @Dumluregn - thanks for the note! We will look to change this behavior through the option you provided and test the update this week. Appreciate your timely help!!

Davis