Changeset 1708

Show
Ignore:
Timestamp:
2008-03-17 04:37:08 (4 months ago)
Author:
martinkou
Message:

Fixed #1055 : Added logic to override JavaScript errors occuring inside the editing frame due to user added JavaScript code.

Location:
FCKeditor/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/classes/fckeditingarea.js

    r1596 r1708  
    9393                var oIFrame = this.IFrame = oTargetDocument.createElement( 'iframe' ) ; 
    9494 
     95                // IE: Avoid JavaScript errors thrown by the editing are source (like tags events). 
     96                // See #1055. 
     97                var sOverrideError = '<script type="text/javascript" _fcktemp="true">window.onerror=function(){return true;};</script>' ; 
     98 
    9599                oIFrame.frameBorder = 0 ; 
    96100                oIFrame.width = oIFrame.height = '100%' ; 
     
    98102                if ( FCK_IS_CUSTOM_DOMAIN && FCKBrowserInfo.IsIE ) 
    99103                { 
    100                         window._FCKHtmlToLoad = html ; 
     104                        window._FCKHtmlToLoad = sOverrideError + html ; 
    101105                        oIFrame.src = 'javascript:void( (function(){' + 
    102106                                'document.open() ;' + 
     
    130134 
    131135                        oDoc.open() ; 
    132                         oDoc.write( html ) ; 
     136                        oDoc.write( sOverrideError + html ) ; 
    133137                        oDoc.close() ; 
    134138                } 
  • FCKeditor/trunk/_whatsnew.html

    r1702 r1708  
    6868                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2000">#2000</a>] The # 
    6969                        character is now properly encoded in file names returned by the File Browser.</li> 
    70                 <li>[<a href="http://dev.fckeditor.net/ticket/1945" target="_blank">#1945</a>] New folders 
    71                         and file names are now properly sanitized against control characters. </li> 
     70                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1945">#1945</a>] New  
     71                        folders and file names are now properly sanitized against control characters. 
     72                        </li> 
     73                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1055">#1055</a>] Added logic 
     74                        to override JavaScript errors occuring inside the editing frame due to user added 
     75                        JavaScript code.</li> 
    7276        </ul> 
    7377        <h3>