Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I stop FCKeditor reverting html entities back to their unicode characters

I am having a problem with FCKeditor reverting html entities entered in the source view back to their original unicode representations. For example when I enter € into the source view, switch to html and then back to source view, the entity is replaced by an actual € symbol. The bigger problem, as a result, is that this unicode character is then sent back to the server on submit causing character encoding issues with the underlying database table. Anyone else come across this? I have tried many combinations of config settings but all to no avail.

like image 677
mysomic Avatar asked Dec 12 '25 03:12

mysomic


2 Answers

What version of FCKeditor are you using? The current version is 2.6.3. I tested the € symbol in their demo by copying € into source view, switched back to display and then back to HTML the ASCII € was retained correctly. As such it sounds like there might be a configuration problem with your install of FCKEditor or you need to upgrade.

Edit: Just found this gem in the FCKEditor documentation: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options/ProcessNumericEntities

like image 150
Anne Porosoff Avatar answered Dec 14 '25 20:12

Anne Porosoff


If you need same setting for CKEditor 3, you can use this:

config.entities = false;

http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.entities

like image 45
Laurynas Avatar answered Dec 14 '25 18:12

Laurynas