Search code examples
phpjavascriptcodeigniterfckeditor

FckEditor converts nbsp; to some strange characters?


I have pasted some text to fckeditor and the spaces become &nbsp thats ok, but when I open the same content the same &nbsp becomes some strange character (like a revers question mark ). I have tried to change FCKConfig.FillEmptyBlocks to false and true but this still did not help. I use fckeditor version 2.6.3, I use this editor in codeigniter php.


Solution

  • In my case, I turn off global_xss_filtering by setting

    $config['global_xss_filtering'] = FALSE;

    and Setting xss_clean on fields that require it.

    or

    Change your character set encoding. See what FckEditor is using.

    I also found this:

    1.- in xhtml files:

    2.- in MySQL database: DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

    3.- FCKeditor requires a change in the configuration file: fckconfig.js in line 65 true for false in the following instruction:

    FCKConfig.IncludeLatinEntities = false ; /* This way worked fine for Spanish */

    See this link: http://ckeditor.com/forums/Support/FCK-UTF-8-encoding-FCKeditor-not-working-special-charac

    Maybe that could fix your problem if you have that turned on.