Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 3796)
+++ /CKEditor/trunk/CHANGES.html	(revision 3797)
@@ -87,4 +87,6 @@
 			may show up empty or uneditable in IE7, 8 and Firefox 3.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/3825">#3825</a> : Fixed JS error when opening spellingcheck.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/3862">#3862</a> : Fixed html parser infinite loop on certain malformed 
+			source code.</li>
 	</ul>
 	<h3>
Index: /CKEditor/trunk/_source/core/htmlparser/fragment.js
===================================================================
--- /CKEditor/trunk/_source/core/htmlparser/fragment.js	(revision 3796)
+++ /CKEditor/trunk/_source/core/htmlparser/fragment.js	(revision 3797)
@@ -284,4 +284,11 @@
 					currentNode = currentNode.parent;
 			}
+			// The tag is not actually closing anything, thus we need invalidate
+			// the pending elements.(#3862)
+			else
+			{
+				pendingInline.splice( 0, index );
+				index = 0;
+			}
 
 			// Check if there is any pending tag to be closed.
