Index: /FCKeditor/trunk/_whatsnew.html
===================================================================
--- /FCKeditor/trunk/_whatsnew.html	(revision 1690)
+++ /FCKeditor/trunk/_whatsnew.html	(revision 1691)
@@ -61,4 +61,9 @@
 		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1920">#1920</a>] Fixed SSL
 			warning message when opening image and flash dialogs under HTTPS in IE6.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1955">#1955</a>]
+			[<a target="_blank" href="http://dev.fckeditor.net/ticket/1981">#1981</a>] 
+			[<a target="_blank" href="http://dev.fckeditor.net/ticket/1985">#1985</a>] 
+			[<a target="_blank" href="http://dev.fckeditor.net/ticket/1989">#1989</a>] 
+			Fixed XHTML source formatting errors in non-IE browsers.</li>
 	</ul>
 	<h3>
Index: /FCKeditor/trunk/editor/_source/internals/fcktools_gecko.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fcktools_gecko.js	(revision 1690)
+++ /FCKeditor/trunk/editor/_source/internals/fcktools_gecko.js	(revision 1691)
@@ -121,34 +121,9 @@
 			// Originaly, we were had the following here:
 			// return document.implementation.createDocument( '', '', null ) ;
-			//
-			// But, when manipulating document.domain (#123), we had
-			// "Permission denied" errors when trying to call methods inside
-			// the returned object. To avoid it, we have to change to the
-			// following, by implementing a "custom" DOM document object, which
-			// includes the methods that are useful for us.
-
-			var domDoc = document.createDocumentFragment() ;
-
-			domDoc.createElement = function( name )
-			{
-				return document.createElement( name ) ;
-			}
-
-			domDoc.createTextNode = function( text )
-			{
-				return document.createTextNode( text ) ;
-			}
-
-			domDoc.createAttribute = function( attName )
-			{
-				return document.createAttribute( attName ) ;
-			}
-
-			domDoc.createComment = function( text )
-			{
-				return document.createComment( text ) ;
-			}
-
-			return domDoc ;
+			// But that doesn't work if we're running under domain relaxation mode, so we need a workaround.
+			// See http://ajaxian.com/archives/xml-messages-with-cross-domain-json about the trick we're using.
+			var doc = ( new DOMParser() ).parseFromString( '<tmp></tmp>', 'text/xml' ) ;
+			FCKDomTools.RemoveNode( doc.firstChild ) ;
+			return doc ;
 	}
 	return null ;
Index: /FCKeditor/trunk/editor/_source/internals/fckxhtml_gecko.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fckxhtml_gecko.js	(revision 1690)
+++ /FCKeditor/trunk/editor/_source/internals/fckxhtml_gecko.js	(revision 1691)
@@ -25,5 +25,5 @@
 FCKXHtml._GetMainXmlString = function()
 {
-	return '<xhtml>' + this.MainNode.innerHTML + '</xhtml>' ;
+	return ( new XMLSerializer() ).serializeToString( this.MainNode ) ;
 }
 
