最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How do I stop FCKeditor reverting html entities back to their unicode characters - Stack Overflow

programmeradmin0浏览0评论

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 e across this? I have tried many binations of config settings but all to no avail.

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 e across this? I have tried many binations of config settings but all to no avail.

Share Improve this question asked Oct 16, 2008 at 21:04 mysomicmysomic 1,5674 gold badges21 silver badges34 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 3

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/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options/ProcessNumericEntities

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

config.entities = false;

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

The problem was a configuration setting - FCKConfig.ProcessHTMLEntities=true.

Altough I had tried changing this in fckconfig.js, I did not realise that the value was being over-ridden in a secondary custom configuration file which had been created by a previous developer.

Thanks Anne.

发布评论

评论列表(0)

  1. 暂无评论