JoeW
JoeW

Reputation: 588

Why does FCKeditor change `<` to `<` and `>` to `>` when editing?

FCKeditor v2.6.6 alters input code containing < and > to &lt; and &gt; respectively causing errors. Is there any way I can configure FCKeditor to parse these characters correctly to avoid them being entered into our database and incorrectly rendered when output in the PHP file?

I have changed the ProcessHTMLEntities to true FCKConfig.ProcessHTMLEntities = true in fckconfig.js but no change. I also have preg_replace running on the final output pages to try an eliminate this, but FCKeditor seems to manage to duplicate its content and the output is not pretty (as per my other question here: Preg_replace/str_replace() for changing `&lt;` and `&gt;` instances to `<` and `>` respectively). I'm hoping there is some code I can add to that file to correct this.

Upvotes: 1

Views: 1327

Answers (1)

Michael Robinson
Michael Robinson

Reputation: 29498

The documentation has this to say:

ProcessHTMLEntities

Specifies that the editor must convert all special characters available in the text to their relative HTML entities, as defined by the W3C standards. It is set to true by default.

Try using FCKConfig.ProcessHTMLEntities = false instead.

Upvotes: 3

Related Questions