Index: /CKEditor/trunk/_source/core/htmlparser/fragment.js
===================================================================
--- /CKEditor/trunk/_source/core/htmlparser/fragment.js	(revision 6628)
+++ /CKEditor/trunk/_source/core/htmlparser/fragment.js	(revision 6629)
@@ -113,12 +113,14 @@
 
 		/*
-		* Beside of simply append specified element to target, it also takes
+		* Beside of simply append specified element to target, this function also takes
 		* care of other dirty lifts like forcing block in body, trimming spaces at
 		* the block boundaries etc.
 		*
-		* Note: This function should NOT change the "currentNode" global unless
-		* there's a return point node specified on the element.
+		* @param {Element} element  The element to be added as the last child of {@link target}.
+		* @param {Element} target The parent element to relieve the new node.
+		* @param {Boolean} [moveCurrent=false] Don't change the "currentNode" global unless
+		* there's a return point node specified on the element, otherwise move current onto {@link target} node.
 		 */
-		function addElement( element, target )
+		function addElement( element, target, moveCurrent )
 		{
 			// Ignore any element that has already been added.
@@ -151,5 +153,5 @@
 
 					// The new target now is the <p>.
-					target = currentNode;
+					element.returnPoint = target = currentNode;
 				}
 			}
@@ -180,5 +182,5 @@
 			}
 			else
-				currentNode = savedCurrent;
+				currentNode = moveCurrent ? target : savedCurrent;
 		}
 
@@ -259,8 +261,5 @@
 						// current one and append the new one to the parent.
 						if ( currentNode.parent )
-						{
-							addElement( currentNode, currentNode.parent );
-							currentNode = currentNode.parent;
-						}
+							addElement( currentNode, currentNode.parent, 1 );
 						// We've tried our best to fix the embarrassment here, while
 						// this element still doesn't find it's parent, mark it as
@@ -400,12 +399,7 @@
 		sendPendingBRs( !CKEDITOR.env.ie && 1 );
 
-		// Close all pending nodes.
+		// Close all pending nodes, make sure return point is properly restored.
 		while ( currentNode != fragment )
-		{
-			// Make sure return point is properly restored.
-			var returnPoint = currentNode.returnPoint;
-			addElement( currentNode, currentNode.parent );
-			currentNode = returnPoint || currentNode.parent;
-		}
+			addElement( currentNode, currentNode.parent, 1 );
 
 		return fragment;
