Opened 16 years ago

Last modified 15 years ago

#2608 closed Bug

Removing carriage return invalidate Javascript — at Initial Version

Reported by: dreamage Owned by:
Priority: Normal Milestone: FCKeditor.Java 2.4.2
Component: Server : Java Version: FCKeditor.Java 2.4
Keywords: Confirmed Cc:

Description

The following line in FCKEditor.java

String encodedValue = escapeXml(value.replaceAll("((\r?\n)+|\t*)", ""));

remove carriage return, but this can destroy Javascript code entered in FCK if the Javascript use line comments.

For example

a comment here

var i = 2;

  • becomes -

a comment var i = 2;

so no more variable declaration.

I don't know what can be done for fix that. Leaving the carriage return in the value attribute of the hidden field seems to be working in IE7 and FF3, but I don't think this is valid XHTML.

Change History (0)

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy