Opened 11 years ago

Closed 11 years ago

#2185 closed Bug (fixed)

FCKPackager incorrectly adds semicolons after functions passed as an argument to another function.

Reported by: Martin Kou Owned by:
Priority: Normal Milestone: FCKeditor 2.6.1
Component: Project : CKPackager Version: SVN (FCKeditor) - Retired
Keywords: Confirmed Cc:

Description (last modified by Martin Kou)

Write the following JavaScript code and let FCKPackager compress it:


FCKPackager would give you something like this:


Notice the semicolon after the anonymous function, it is incorrect.

This bug is causing the current FCKeditor code in the SVN unusable after running build_release.bat, because of the following code in fckdocumentprocessor.js:

if ( FCKBrowserInfo.IsSafari )
        FCKDocumentProcessor.AppendNew().ProcessDocument = function( doc )
                var spans = doc.getElementsByClassName ?
                        doc.getElementsByClassName( 'Apple-style-span' ) :
                                        doc.getElementsByTagName( 'span' ),
                                        function( item ){ return item.className == 'Apple-style-span' ; }
                                        ) ;
                for ( var i = spans.length - 1 ; i >= 0 ; i-- )
                        FCKDomTools.RemoveNode( spans[i], true ) ;

Change History (4)

comment:1 Changed 11 years ago by Martin Kou

Component: GeneralProject : FCKpackager

comment:2 Changed 11 years ago by Martin Kou

A short term fix can be committed to fckdocumentprocessor.js instead, making the closing bracket of end up in the same line as the last argument. However, a fix to FCKpackager itself would be the best if possible.

comment:3 Changed 11 years ago by Martin Kou

Description: modified (diff)

comment:4 Changed 11 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: newclosed

This is quite a serious problem, as it is blocking the nightly.

Fixed with [1976], [1977] and [1978].

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy