Index: /CKEditor/trunk/_source/core/htmlparser/fragment.js
===================================================================
--- /CKEditor/trunk/_source/core/htmlparser/fragment.js	(revision 3641)
+++ /CKEditor/trunk/_source/core/htmlparser/fragment.js	(revision 3642)
@@ -51,4 +51,5 @@
 	 * Creates a {@link CKEDITOR.htmlParser.fragment} from an HTML string.
 	 * @param {String} fragmentHtml The HTML to be parsed, filling the fragment.
+	 * @param {Number} [fixForBody=false] Wrap body with specified element if needed.
 	 * @returns CKEDITOR.htmlParser.fragment The fragment created.
 	 * @example
@@ -108,5 +109,5 @@
 				// Create a <p> in the fragment.
 				currentNode = target;
-				parser.onTagOpen( 'p', {} );
+				parser.onTagOpen( fixForBody, {} );
 
 				// The new target now is the <p>.
@@ -301,5 +302,5 @@
 
 			if ( fixForBody && !currentNode.type )
-				this.onTagOpen( 'p', {} );
+				this.onTagOpen( fixForBody, {} );
 
 			currentNode.add( new CKEDITOR.htmlParser.text( text ) );
@@ -328,5 +329,5 @@
 			{
 				currentNode = parent;
-				parser.onTagOpen( 'p', {} );
+				parser.onTagOpen( fixForBody, {} );
 				parent = currentNode;
 			}
Index: /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js	(revision 3641)
+++ /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js	(revision 3642)
@@ -423,5 +423,9 @@
 								// Get the HTML version of the data.
 								if ( editor.dataProcessor )
-									data = editor.dataProcessor.toHtml( data, ( editor.config.enterMode != CKEDITOR.ENTER_BR ) );
+								{
+									var fixForBody = ( editor.config.enterMode != CKEDITOR.ENTER_BR )
+										? editor.config.enterMode == CKEDITOR.ENTER_DIV ? 'div' : 'p' : false;
+									data = editor.dataProcessor.toHtml( data, fixForBody );
+								}
 
 								data =
