Index: _source/plugins/list/plugin.js
===================================================================
--- _source/plugins/list/plugin.js	(revision 5285)
+++ _source/plugins/list/plugin.js	Tue Mar 30 19:36:40 CST 2010
@@ -228,6 +228,8 @@
 		newList.listNode.replace( groupObj.root );
 	}
 
+	var headerTagRegex = /^h[1-6]$/;
+
 	function createList( editor, groupObj, listsCreated )
 	{
 		var contents = groupObj.contents,
@@ -279,8 +281,22 @@
 		{
 			var contentBlock = listContents.shift(),
 				listItem = doc.createElement( 'li' );
-			contentBlock.moveChildren( listItem );
+
+			// Preserve heading structure when converting to list item. (#5271)
+			if ( headerTagRegex.test( contentBlock.getName() ) )
+			{
+				var tmp = new CKEDITOR.dom.documentFragment( contentBlock.getDocument() );
+				tmp.append( contentBlock );
+				contentBlock = tmp;
+			}
+			
+			if ( contentBlock.type == CKEDITOR.NODE_ELEMENT )
+			{
+				contentBlock.copyAttributes( listItem );
-			contentBlock.remove();
+				contentBlock.remove();
+			}
+
+			contentBlock.moveChildren( listItem );
 			listItem.appendTo( listNode );
 
 			// Append a bogus BR to force the LI to render at full height
