Index: /FCKeditor/trunk/editor/_source/internals/fckxhtml.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fckxhtml.js	(revision 1062)
+++ /FCKeditor/trunk/editor/_source/internals/fckxhtml.js	(revision 1063)
@@ -313,17 +313,4 @@
 FCKXHtml.TagProcessors =
 {
-	img : function( node, htmlNode )
-	{
-		// The "ALT" attribute is required in XHTML.
-		if ( ! node.attributes.getNamedItem( 'alt' ) )
-			FCKXHtml._AppendAttribute( node, 'alt', '' ) ;
-
-		var sSavedUrl = htmlNode.getAttribute( '_fcksavedurl' ) ;
-		if ( sSavedUrl != null )
-			FCKXHtml._AppendAttribute( node, 'src', sSavedUrl ) ;
-
-		return node ;
-	},
-
 	a : function( node, htmlNode )
 	{
@@ -347,109 +334,4 @@
 		node = FCKXHtml._AppendChildNodes( node, htmlNode, false ) ;
 
-		return node ;
-	},
-
-	script : function( node, htmlNode )
-	{
-		// The "TYPE" attribute is required in XHTML.
-		if ( ! node.attributes.getNamedItem( 'type' ) )
-			FCKXHtml._AppendAttribute( node, 'type', 'text/javascript' ) ;
-
-		node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( htmlNode.text ) ) ) ;
-
-		return node ;
-	},
-
-	style : function( node, htmlNode )
-	{
-		// The "TYPE" attribute is required in XHTML.
-		if ( ! node.attributes.getNamedItem( 'type' ) )
-			FCKXHtml._AppendAttribute( node, 'type', 'text/css' ) ;
-
-		var cssText = htmlNode.innerHTML ;
-		if ( FCKBrowserInfo.IsIE )	// Bug #403 : IE always appends a \r\n to the beginning of StyleNode.innerHTML
-			cssText = cssText.replace( /^(\r\n|\n|\r)/, '' ) ;
-
-		node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( cssText ) ) ) ;
-
-		return node ;
-	},
-
-	pre : function ( node, htmlNode )
-	{
-		var firstChild = htmlNode.firstChild ;
-
-		if ( firstChild && firstChild.nodeType == 3 )
-			node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( '\r\n' ) ) ) ;
-
-		FCKXHtml._AppendChildNodes( node, htmlNode, true ) ;
-
-		return node ;
-	},
-
-	title : function( node, htmlNode )
-	{
-		node.appendChild( FCKXHtml.XML.createTextNode( FCK.EditorDocument.title ) ) ;
-
-		return node ;
-	},
-
-	// Fix nested <ul> and <ol>.
-	ol : function( node, htmlNode, targetNode )
-	{
-		if ( htmlNode.innerHTML.Trim().length == 0 )
-			return false ;
-
-		var ePSibling = targetNode.lastChild ;
-
-		if ( ePSibling && ePSibling.nodeType == 3 )
-			ePSibling = ePSibling.previousSibling ;
-
-		if ( ePSibling && ePSibling.nodeName.toUpperCase() == 'LI' )
-		{
-			htmlNode._fckxhtmljob = null ;
-			FCKXHtml._AppendNode( ePSibling, htmlNode ) ;
-			return false ;
-		}
-
-		node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
-
-		return node ;
-	},
-
-	span : function( node, htmlNode )
-	{
-		// Firefox may create empty tags when deleting the selection in some special cases (SF-BUG 1084404).
-		if ( htmlNode.innerHTML.length == 0 )
-			return false ;
-
-		node = FCKXHtml._AppendChildNodes( node, htmlNode, false ) ;
-
-		return node ;
-	},
-
-	// IE loses contents of iframes, and Gecko does give it back HtmlEncoded
-	// Note: Opera does lose the content and doesn't provide it in the innerHTML string
-	iframe : function( node, htmlNode )
-	{
-		var sHtml = htmlNode.innerHTML ;
-
-		// Gecko does give back the encoded html
-		if ( FCKBrowserInfo.IsGecko )
-			sHtml = FCKTools.HTMLDecode( sHtml );
-
-		// Remove the saved urls here as the data won't be processed as nodes
-		sHtml = sHtml.replace( /\s_fcksavedurl="[^"]*"/g, '' ) ;
-
-		node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( sHtml ) ) ) ;
-
-		return node ;
-	},
-
-	body : function( node, htmlNode )
-	{
-		node = FCKXHtml._AppendChildNodes( node, htmlNode, false ) ;
-		// Remove spellchecker attributes added for Firefox when converting to HTML code (Bug #1351).
-		node.removeAttribute( 'spellcheck' ) ;
 		return node ;
 	},
@@ -480,6 +362,123 @@
 
 		return node ;
-	}
-
+	},
+
+	body : function( node, htmlNode )
+	{
+		node = FCKXHtml._AppendChildNodes( node, htmlNode, false ) ;
+		// Remove spellchecker attributes added for Firefox when converting to HTML code (Bug #1351).
+		node.removeAttribute( 'spellcheck' ) ;
+		return node ;
+	},
+
+	// IE loses contents of iframes, and Gecko does give it back HtmlEncoded
+	// Note: Opera does lose the content and doesn't provide it in the innerHTML string
+	iframe : function( node, htmlNode )
+	{
+		var sHtml = htmlNode.innerHTML ;
+
+		// Gecko does give back the encoded html
+		if ( FCKBrowserInfo.IsGecko )
+			sHtml = FCKTools.HTMLDecode( sHtml );
+
+		// Remove the saved urls here as the data won't be processed as nodes
+		sHtml = sHtml.replace( /\s_fcksavedurl="[^"]*"/g, '' ) ;
+
+		node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( sHtml ) ) ) ;
+
+		return node ;
+	},
+
+	img : function( node, htmlNode )
+	{
+		// The "ALT" attribute is required in XHTML.
+		if ( ! node.attributes.getNamedItem( 'alt' ) )
+			FCKXHtml._AppendAttribute( node, 'alt', '' ) ;
+
+		var sSavedUrl = htmlNode.getAttribute( '_fcksavedurl' ) ;
+		if ( sSavedUrl != null )
+			FCKXHtml._AppendAttribute( node, 'src', sSavedUrl ) ;
+
+		return node ;
+	},
+
+	// Fix nested <ul> and <ol>.
+	ol : function( node, htmlNode, targetNode )
+	{
+		if ( htmlNode.innerHTML.Trim().length == 0 )
+			return false ;
+
+		var ePSibling = targetNode.lastChild ;
+
+		if ( ePSibling && ePSibling.nodeType == 3 )
+			ePSibling = ePSibling.previousSibling ;
+
+		if ( ePSibling && ePSibling.nodeName.toUpperCase() == 'LI' )
+		{
+			htmlNode._fckxhtmljob = null ;
+			FCKXHtml._AppendNode( ePSibling, htmlNode ) ;
+			return false ;
+		}
+
+		node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
+
+		return node ;
+	},
+
+	pre : function ( node, htmlNode )
+	{
+		var firstChild = htmlNode.firstChild ;
+
+		if ( firstChild && firstChild.nodeType == 3 )
+			node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( '\r\n' ) ) ) ;
+
+		FCKXHtml._AppendChildNodes( node, htmlNode, true ) ;
+
+		return node ;
+	},
+
+	script : function( node, htmlNode )
+	{
+		// The "TYPE" attribute is required in XHTML.
+		if ( ! node.attributes.getNamedItem( 'type' ) )
+			FCKXHtml._AppendAttribute( node, 'type', 'text/javascript' ) ;
+
+		node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( htmlNode.text ) ) ) ;
+
+		return node ;
+	},
+
+	span : function( node, htmlNode )
+	{
+		// Firefox may create empty tags when deleting the selection in some special cases (SF-BUG 1084404).
+		if ( htmlNode.innerHTML.length == 0 )
+			return false ;
+
+		node = FCKXHtml._AppendChildNodes( node, htmlNode, false ) ;
+
+		return node ;
+	},
+
+	style : function( node, htmlNode )
+	{
+		// The "TYPE" attribute is required in XHTML.
+		if ( ! node.attributes.getNamedItem( 'type' ) )
+			FCKXHtml._AppendAttribute( node, 'type', 'text/css' ) ;
+
+		var cssText = htmlNode.innerHTML ;
+		if ( FCKBrowserInfo.IsIE )	// Bug #403 : IE always appends a \r\n to the beginning of StyleNode.innerHTML
+			cssText = cssText.replace( /^(\r\n|\n|\r)/, '' ) ;
+
+		node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( cssText ) ) ) ;
+
+		return node ;
+	},
+
+	title : function( node, htmlNode )
+	{
+		node.appendChild( FCKXHtml.XML.createTextNode( FCK.EditorDocument.title ) ) ;
+
+		return node ;
+	}
 } ;
 
Index: /FCKeditor/trunk/editor/_source/internals/fckxhtml_ie.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fckxhtml_ie.js	(revision 1062)
+++ /FCKeditor/trunk/editor/_source/internals/fckxhtml_ie.js	(revision 1063)
@@ -83,4 +83,83 @@
 }
 
+// On very rare cases, IE is loosing the "align" attribute for DIV. (right align and apply bulleted list)
+FCKXHtml.TagProcessors['div'] = function( node, htmlNode )
+{
+	if ( htmlNode.align.length > 0 )
+		FCKXHtml._AppendAttribute( node, 'align', htmlNode.align ) ;
+
+	node = FCKXHtml._AppendChildNodes( node, htmlNode, true ) ;
+
+	return node ;
+}
+
+// IE automatically changes <FONT> tags to <FONT size=+0>.
+FCKXHtml.TagProcessors['font'] = function( node, htmlNode )
+{
+	if ( node.attributes.length == 0 )
+		node = FCKXHtml.XML.createDocumentFragment() ;
+
+	node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
+
+	return node ;
+}
+
+FCKXHtml.TagProcessors['form'] = function( node, htmlNode )
+{
+	if ( htmlNode.acceptCharset && htmlNode.acceptCharset.length > 0 && htmlNode.acceptCharset != 'UNKNOWN' )
+		FCKXHtml._AppendAttribute( node, 'accept-charset', htmlNode.acceptCharset ) ;
+
+	// IE has a bug and htmlNode.attributes['name'].specified=false if there is
+	// no element with id="name" inside the form (#360 and SF-BUG-1155726).
+	var nameAtt = htmlNode.attributes['name'] ;
+
+	if ( nameAtt && nameAtt.value.length > 0 )
+		FCKXHtml._AppendAttribute( node, 'name', nameAtt.value ) ;
+
+	node = FCKXHtml._AppendChildNodes( node, htmlNode, true ) ;
+
+	return node ;
+}
+
+// IE doens't see the value attribute as an attribute for the <INPUT> tag.
+FCKXHtml.TagProcessors['input'] = function( node, htmlNode )
+{
+	if ( htmlNode.name )
+		FCKXHtml._AppendAttribute( node, 'name', htmlNode.name ) ;
+
+	if ( htmlNode.value && !node.attributes.getNamedItem( 'value' ) )
+		FCKXHtml._AppendAttribute( node, 'value', htmlNode.value ) ;
+
+	if ( !node.attributes.getNamedItem( 'type' ) )
+		FCKXHtml._AppendAttribute( node, 'type', 'text' ) ;
+
+	return node ;
+}
+
+FCKXHtml.TagProcessors['label'] = function( node, htmlNode )
+{
+	if ( htmlNode.htmlFor.length > 0 )
+		FCKXHtml._AppendAttribute( node, 'for', htmlNode.htmlFor ) ;
+
+	node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
+
+	return node ;
+}
+
+// Fix behavior for IE, it doesn't read back the .name on newly created maps 
+FCKXHtml.TagProcessors['map'] = function( node, htmlNode )
+{
+	if ( ! node.attributes.getNamedItem( 'name' ) )
+	{
+		var name = htmlNode.name ;
+		if ( name )
+			FCKXHtml._AppendAttribute( node, 'name', name ) ;
+	}
+
+	node = FCKXHtml._AppendChildNodes( node, htmlNode, true ) ;
+
+	return node ;
+}
+
 FCKXHtml.TagProcessors['meta'] = function( node, htmlNode )
 {
@@ -102,102 +181,23 @@
 }
 
-// IE automatically changes <FONT> tags to <FONT size=+0>.
-FCKXHtml.TagProcessors['font'] = function( node, htmlNode )
-{
-	if ( node.attributes.length == 0 )
-		node = FCKXHtml.XML.createDocumentFragment() ;
-
-	node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
-
-	return node ;
-}
-
-// IE doens't see the value attribute as an attribute for the <INPUT> tag.
-FCKXHtml.TagProcessors['input'] = function( node, htmlNode )
+// IE ignores the "SELECTED" attribute so we must add it manually.
+FCKXHtml.TagProcessors['option'] = function( node, htmlNode )
+{
+	if ( htmlNode.selected && !node.attributes.getNamedItem( 'selected' ) )
+		FCKXHtml._AppendAttribute( node, 'selected', 'selected' ) ;
+
+	node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
+
+	return node ;
+}
+
+// IE doens't hold the name attribute as an attribute for the <TEXTAREA> and <SELECT> tags.
+FCKXHtml.TagProcessors['textarea'] = FCKXHtml.TagProcessors['select'] = function( node, htmlNode )
 {
 	if ( htmlNode.name )
 		FCKXHtml._AppendAttribute( node, 'name', htmlNode.name ) ;
 
-	if ( htmlNode.value && !node.attributes.getNamedItem( 'value' ) )
-		FCKXHtml._AppendAttribute( node, 'value', htmlNode.value ) ;
-
-	if ( !node.attributes.getNamedItem( 'type' ) )
-		FCKXHtml._AppendAttribute( node, 'type', 'text' ) ;
-
-	return node ;
-}
-
-// IE ignores the "SELECTED" attribute so we must add it manually.
-FCKXHtml.TagProcessors['option'] = function( node, htmlNode )
-{
-	if ( htmlNode.selected && !node.attributes.getNamedItem( 'selected' ) )
-		FCKXHtml._AppendAttribute( node, 'selected', 'selected' ) ;
-
-	node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
-
-	return node ;
-}
-
-FCKXHtml.TagProcessors['label'] = function( node, htmlNode )
-{
-	if ( htmlNode.htmlFor.length > 0 )
-		FCKXHtml._AppendAttribute( node, 'for', htmlNode.htmlFor ) ;
-
-	node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
-
-	return node ;
-}
-
-FCKXHtml.TagProcessors['form'] = function( node, htmlNode )
-{
-	if ( htmlNode.acceptCharset && htmlNode.acceptCharset.length > 0 && htmlNode.acceptCharset != 'UNKNOWN' )
-		FCKXHtml._AppendAttribute( node, 'accept-charset', htmlNode.acceptCharset ) ;
-
-	// IE has a bug and htmlNode.attributes['name'].specified=false if there is
-	// no element with id="name" inside the form (#360 and SF-BUG-1155726).
-	var nameAtt = htmlNode.attributes['name'] ;
-
-	if ( nameAtt && nameAtt.value.length > 0 )
-		FCKXHtml._AppendAttribute( node, 'name', nameAtt.value ) ;
-
-	node = FCKXHtml._AppendChildNodes( node, htmlNode, true ) ;
-
-	return node ;
-}
-
-// IE doens't hold the name attribute as an attribute for the <TEXTAREA> and <SELECT> tags.
-FCKXHtml.TagProcessors['textarea'] = FCKXHtml.TagProcessors['select'] = function( node, htmlNode )
-{
-	if ( htmlNode.name )
-		FCKXHtml._AppendAttribute( node, 'name', htmlNode.name ) ;
-
-	node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
-
-	return node ;
-}
-
-// On very rare cases, IE is loosing the "align" attribute for DIV. (right align and apply bulleted list)
-FCKXHtml.TagProcessors['div'] = function( node, htmlNode )
-{
-	if ( htmlNode.align.length > 0 )
-		FCKXHtml._AppendAttribute( node, 'align', htmlNode.align ) ;
-
-	node = FCKXHtml._AppendChildNodes( node, htmlNode, true ) ;
-
-	return node ;
-}
-
-// Fix behavior for IE, it doesn't read back the .name on newly created maps 
-FCKXHtml.TagProcessors['map'] = function( node, htmlNode )
-{
-	if ( ! node.attributes.getNamedItem( 'name' ) )
-	{
-		var name = htmlNode.name ;
-		if ( name )
-			FCKXHtml._AppendAttribute( node, 'name', name ) ;
-	}
-
-	node = FCKXHtml._AppendChildNodes( node, htmlNode, true ) ;
-
-	return node ;
-}
+	node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
+
+	return node ;
+}
