Ticket #1322: document-write.patch
File document-write.patch, 2.0 KB (added by , 17 years ago) |
---|
-
editor/_source/internals/fcktools.js
108 108 return text ; 109 109 } 110 110 111 FCKTools.JavaScriptLiteralEncode = function( text ) 112 { 113 text = text || '' ; 114 return '"' + text.replace(/([\/\\"])/g, '\\$1') + '"' ; 115 } 116 111 117 FCKTools._ProcessLineBreaksForPMode = function( oEditor, text, liState, node, strArray ) 112 118 { 113 119 var closeState = 0 ; -
editor/_source/classes/fckpanel.js
42 42 } 43 43 else 44 44 { 45 // Workaround for Safari 12256. Ticket #63 46 var sBase = '' ; 47 if ( FCKBrowserInfo.IsSafari ) 48 sBase = '<base href="' + window.document.location + '">' ; 49 50 var sHTML = '<html><head>' + sBase + '<\/head><body style="margin:0px;padding:0px;"><\/body><\/html>' ; 51 45 52 var oIFrame = this._IFrame = this._Window.document.createElement('iframe') ; 46 oIFrame.src = 'javascript: void(0)';53 oIFrame.src = 'javascript:' + FCKTools.JavaScriptLiteralEncode( sHTML ) ; 47 54 oIFrame.allowTransparency = true ; 48 55 oIFrame.frameBorder = '0' ; 49 56 oIFrame.scrolling = 'no' ; … … 77 84 78 85 oDocument = this.Document = oIFrameWindow.document ; 79 86 80 // Workaround for Safari 12256. Ticket #6381 var sBase = '' ;82 if ( FCKBrowserInfo.IsSafari )83 sBase = '<base href="' + window.document.location + '">' ;84 85 // Initialize the IFRAME document body.86 oDocument.open() ;87 oDocument.write( '<html><head>' + sBase + '<\/head><body style="margin:0px;padding:0px;"><\/body><\/html>' ) ;88 oDocument.close() ;89 90 87 FCKTools.AddEventListenerEx( oIFrameWindow, 'focus', FCKPanel_Window_OnFocus, this ) ; 91 88 FCKTools.AddEventListenerEx( oIFrameWindow, 'blur', FCKPanel_Window_OnBlur, this ) ; 92 89 }