Ticket #1055: 1055.patch
File 1055.patch, 2.3 KB (added by , 16 years ago) |
---|
-
_whatsnew.html
58 58 mode.</li> 59 59 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1934">#1934</a>] Fixed 60 60 JavaScript errors when calling Selection.EnsureSelection() in dialogs.</li> 61 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1055">#1055</a>] Added logic 62 to override JavaScript errors occuring inside the editing frame due to user added 63 JavaScript code.</li> 61 64 </ul> 62 65 <h3> 63 66 Version 2.6 Beta 1</h3> -
editor/_source/classes/fckeditingarea.js
92 92 // Create the editing area IFRAME. 93 93 var oIFrame = this.IFrame = oTargetDocument.createElement( 'iframe' ) ; 94 94 95 // IE: Avoid JavaScript errors thrown by the editing are source (like tags events). 96 // See #1055. 97 var sOverrideError = '<script>window.onerror=function(){return true;};//FCK_IGNORE</script>' ; 98 95 99 oIFrame.frameBorder = 0 ; 96 100 oIFrame.width = oIFrame.height = '100%' ; 97 101 98 102 if ( FCK_IS_CUSTOM_DOMAIN && FCKBrowserInfo.IsIE ) 99 103 { 100 window._FCKHtmlToLoad = html ;104 window._FCKHtmlToLoad = sOverrideError + html ; 101 105 oIFrame.src = 'javascript:void( (function(){' + 102 106 'document.open() ;' + 103 107 'document.domain="' + document.domain + '" ;' + … … 129 133 var oDoc = this.Window.document ; 130 134 131 135 oDoc.open() ; 136 oDoc.write( sOverrideError ) ; 132 137 oDoc.write( html ) ; 133 138 oDoc.close() ; 134 139 } -
editor/_source/internals/fck.js
248 248 FCKConfig.IgnoreEmptyParagraphValue, 249 249 format ) ; 250 250 251 // Remove <SCRIPT> tags with FCK_IGNORE (For #1055 in full page mode). 252 if ( isFullPage ) 253 data = data.replace( /\s*<script[^<>]*>[^<>]*\/\/FCK_IGNORE[^<>]*<\/script>/ig, '' ) ; 254 251 255 // Restore protected attributes. 252 256 data = FCK.ProtectEventsRestore( data ) ; 253 257