Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 7410)
+++ /CKEditor/trunk/CHANGES.html	(revision 7411)
@@ -77,4 +77,5 @@
 		<li><a href="http://dev.ckeditor.com/ticket/6111">#6111</a> : Splitting cells results in incorrect column spans.</li>
 		<li><a href="http://dev.ckeditor.com/ticket/8247">#8247</a> : [IE] Fix error when indent with page breaks inside of contents.</li>
+		<li><a href="http://dev.ckeditor.com/ticket/8540">#8540</a> : Fix malformed HTML list/table with text directly inside of it.</li>
 	</ul>
 	<h3>
Index: /CKEditor/trunk/_source/core/htmlparser/fragment.js
===================================================================
--- /CKEditor/trunk/_source/core/htmlparser/fragment.js	(revision 7410)
+++ /CKEditor/trunk/_source/core/htmlparser/fragment.js	(revision 7411)
@@ -395,4 +395,20 @@
 			}
 
+			var currentName = currentNode.name,
+			currentDtd = currentName ? ( CKEDITOR.dtd[ currentName ]
+							|| ( currentNode._.isBlockLike ?
+								 CKEDITOR.dtd.div : CKEDITOR.dtd.span ) ) : rootDtd;
+
+			// Fix orphan text in list/table. (#8540)
+			if ( !currentDtd [ '#' ] && currentName in nonBreakingBlocks )
+			{
+				parser.onTagOpen( currentName in listBlocks ? 'li' :
+								  currentName == 'dl' ? 'dd' :
+								  currentName == 'table' ? 'tr' :
+								  currentName == 'tr' ? 'td' : '' );
+				parser.onText( text );
+				return;
+			}
+
 			sendPendingBRs();
 			checkPending();
