Ticket #1989: 1989.patch
File 1989.patch, 2.8 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/1981">#1981</a>] 62 [<a target="_blank" href="http://dev.fckeditor.net/ticket/1989">#1989</a>] Fixed 63 XHTML source formatting errors in non-IE browsers.</li> 61 64 </ul> 62 65 <h3> 63 66 Version 2.6 Beta 1</h3> -
editor/_source/internals/fcktools_gecko.js
120 120 case 'DOMDocument' : 121 121 // Originaly, we were had the following here: 122 122 // return document.implementation.createDocument( '', '', null ) ; 123 // 124 // But, when manipulating document.domain (#123), we had 125 // "Permission denied" errors when trying to call methods inside 126 // the returned object. To avoid it, we have to change to the 127 // following, by implementing a "custom" DOM document object, which 128 // includes the methods that are useful for us. 129 130 var domDoc = document.createDocumentFragment() ; 131 132 domDoc.createElement = function( name ) 133 { 134 return document.createElement( name ) ; 135 } 136 137 domDoc.createTextNode = function( text ) 138 { 139 return document.createTextNode( text ) ; 140 } 141 142 domDoc.createAttribute = function( attName ) 143 { 144 return document.createAttribute( attName ) ; 145 } 146 147 domDoc.createComment = function( text ) 148 { 149 return document.createComment( text ) ; 150 } 151 152 return domDoc ; 123 // But that doesn't work if we're running under domain relaxation mode, so we need a workaround. 124 // See http://ajaxian.com/archives/xml-messages-with-cross-domain-json about the trick we're using. 125 var doc = ( new DOMParser() ).parseFromString( '<tmp></tmp>', 'text/xml' ) ; 126 FCKDomTools.RemoveNode( doc.firstChild ) ; 127 return doc ; 153 128 } 154 129 return null ; 155 130 } -
editor/_source/internals/fckxhtml_gecko.js
24 24 25 25 FCKXHtml._GetMainXmlString = function() 26 26 { 27 return '<xhtml>' + this.MainNode.innerHTML + '</xhtml>';27 return ( new XMLSerializer() ).serializeToString( this.MainNode ) ; 28 28 } 29 29 30 30 FCKXHtml._AppendAttributes = function( xmlNode, htmlNode, node )