Index: /CKEditor/trunk/_source/core/dtd.js
===================================================================
--- /CKEditor/trunk/_source/core/dtd.js	(revision 3250)
+++ /CKEditor/trunk/_source/core/dtd.js	(revision 3251)
@@ -54,4 +54,6 @@
 		Q = {li:1};
 
+	var block = {address:1,blockquote:1,center:1,dir:1,div:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,isindex:1,menu:1,noframes:1,ol:1,p:1,pre:1,table:1,ul:1};
+
     return /** @lends CKEDITOR.dtd */ {
 
@@ -63,5 +65,7 @@
 		 * @example
 		 */
-		$block : {address:1,blockquote:1,center:1,dir:1,div:1,dl:1,fieldset:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,isindex:1,menu:1,noframes:1,ol:1,p:1,pre:1,table:1,ul:1},
+		$block : block,
+
+		$body : X({script:1}, block),
 
 		/**
Index: /CKEditor/trunk/_source/core/htmlparser/fragment.js
===================================================================
--- /CKEditor/trunk/_source/core/htmlparser/fragment.js	(revision 3250)
+++ /CKEditor/trunk/_source/core/htmlparser/fragment.js	(revision 3251)
@@ -51,5 +51,5 @@
 	 * alert( fragment.children[1].value );  " Text"
 	 */
-	CKEDITOR.htmlParser.fragment.fromHtml = function( fragmentHtml )
+	CKEDITOR.htmlParser.fragment.fromHtml = function( fragmentHtml, fixForBody )
 	{
 		var parser = new CKEDITOR.htmlParser(),
@@ -91,4 +91,7 @@
 		parser.onTagOpen = function( tagName, attributes, selfClosing )
 		{
+			if ( fixForBody && !currentNode.type && !CKEDITOR.dtd.$body[ tagName ] )
+				this.onTagOpen( 'p', {} );
+
 			var element = new CKEDITOR.htmlParser.element( tagName, attributes );
 
@@ -209,4 +212,8 @@
 
 			checkPending();
+
+			if ( fixForBody && !currentNode.type )
+				this.onTagOpen( 'p', {} );
+
 			currentNode.add( new CKEDITOR.htmlParser.text( text ) );
 		};
Index: /CKEditor/trunk/_source/plugins/htmldataprocessor/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/htmldataprocessor/plugin.js	(revision 3250)
+++ /CKEditor/trunk/_source/plugins/htmldataprocessor/plugin.js	(revision 3251)
@@ -125,5 +125,5 @@
 	CKEDITOR.htmlDataProcessor.prototype =
 	{
-		toHtml : function( data )
+		toHtml : function( data, fixForBody )
 		{
 			// The source data is already HTML, but we need to clean
@@ -142,5 +142,5 @@
 			// Now use our parser to make further fixes to the structure, as
 			// well as apply the filter.
-			var fragment = CKEDITOR.htmlParser.fragment.fromHtml( div.innerHTML ),
+			var fragment = CKEDITOR.htmlParser.fragment.fromHtml( div.innerHTML, fixForBody ),
 				writer = new CKEDITOR.htmlParser.basicWriter();
 
@@ -150,8 +150,8 @@
 		},
 
-		toDataFormat : function( html )
+		toDataFormat : function( html, fixForBody )
 		{
 			var writer = this.writer,
-				fragment = CKEDITOR.htmlParser.fragment.fromHtml( html );
+				fragment = CKEDITOR.htmlParser.fragment.fromHtml( html, fixForBody );
 
 			writer.reset();
Index: /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js	(revision 3250)
+++ /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js	(revision 3251)
@@ -290,5 +290,5 @@
 								// Get the HTML version of the data.
 								if ( editor.dataProcessor )
-									data = editor.dataProcessor.toHtml( data );
+									data = editor.dataProcessor.toHtml( data, ( editor.config.enterMode != CKEDITOR.ENTER_BR ) );
 
 								data =
@@ -340,5 +340,5 @@
 
 								if ( editor.dataProcessor )
-									data = editor.dataProcessor.toDataFormat( data );
+									data = editor.dataProcessor.toDataFormat( data, ( editor.config.enterMode != CKEDITOR.ENTER_BR ) );
 
 								return data;
