Ticket #1055: 1055_2.patch
File 1055_2.patch, 1.8 KB (added by , 16 years ago) |
---|
-
_whatsnew.html
65 65 [<a target="_blank" href="http://dev.fckeditor.net/ticket/1985">#1985</a>] 66 66 [<a target="_blank" href="http://dev.fckeditor.net/ticket/1989">#1989</a>] 67 67 Fixed XHTML source formatting errors in non-IE browsers.</li> 68 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1055">#1055</a>] Added logic 69 to override JavaScript errors occuring inside the editing frame due to user added 70 JavaScript code.</li> 68 71 </ul> 69 72 <h3> 70 73 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 type="text/javascript" _fcktemp="true">window.onerror=function(){return true;};</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() ; 132 oDoc.write( html ) ;136 oDoc.write( sOverrideError + html ) ; 133 137 oDoc.close() ; 134 138 } 135 139