Apostrophes broken in FCKeditor.Java
|Reported by:||jsampson@…||Owned by:|
|Component:||Server : Java||Version:|
Description (last modified by martinkou)
In FCKeditor.Java version 2.3, in the file FCKeditor.java, the HTMLEncode method escapes apostrophes incorrectly. It uses ’, which is actually the Windows Cp1252 encoding of the right single quotation mark character (U+2019). Apostrophe is actually U+0027, or '.
The symptom is that when a text containing apostrophes is edited, the apostrophes are all converted to right single quotation marks at the time of rendering the editor.
My recommendation is to simply not escape apostrophes at all, since the output of this method is never placed inside apostrophes (it's used both as a double-quoted HTML attribute value and as the text content within an HTML element). Simply remove the following line from the HTMLEncode method: