Index: editor/_source/internals/fckxhtml.js
===================================================================
--- editor/_source/internals/fckxhtml.js	(revision 1332)
+++ editor/_source/internals/fckxhtml.js	(working copy)
@@ -403,6 +403,26 @@
 		return node ;
 	},
 
+	// Fix orphaned <li> nodes (Bug #503).
+	li : function( node, htmlNode, targetNode )
+	{
+		// If the XML parent node is already a <ul> or <ol>, then add the <li> as usual.
+		if ( targetNode.nodeName.IEquals( ['ul', 'ol'] ) )
+			return FCKXHtml._AppendChildNodes( node, htmlNode, true ) ;
+
+		var newTarget ;
+
+		// Try to group orphaned <li> nodes into the last <ul>.
+		// Create one if the previous added node wasn't an <ul>.
+		if ( targetNode.lastChild && targetNode.lastChild.nodeName.IEquals( 'ul' ) )
+			newTarget = targetNode.lastChild ;
+		else
+			newTarget = FCKXHtml.XML.createElement( 'ul' ) ;
+		htmlNode._fckxhtmljob = null ;
+		FCKXHtml._AppendNode( newTarget, htmlNode ) ;
+		return newTarget ;
+	},
+
 	// Fix nested <ul> and <ol>.
 	ol : function( node, htmlNode, targetNode )
 	{
