Index: CKEditor/trunk/CHANGES.html
===================================================================
--- CKEditor/trunk/CHANGES.html	(revision 3830)
+++ CKEditor/trunk/CHANGES.html	(revision 3831)
@@ -1,3 +1,3 @@
-﻿﻿﻿﻿﻿﻿﻿﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+﻿﻿﻿﻿﻿﻿﻿﻿﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <!--
 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
@@ -108,4 +108,5 @@
 		<li><a href="http://dev.fckeditor.net/ticket/3894">#3894</a> : Fixed an issue where editor failed to initialize when using the on-demand loading way.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/3903">#3903</a> : Color button plugin doesn't read config entry from editor instance correctly.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/3801">#3801</a> : Comments at the start of the document was lost in IE.</li>
 	</ul>
 	<h3>
Index: CKEditor/trunk/_source/plugins/htmldataprocessor/plugin.js
===================================================================
--- CKEditor/trunk/_source/plugins/htmldataprocessor/plugin.js	(revision 3830)
+++ CKEditor/trunk/_source/plugins/htmldataprocessor/plugin.js	(revision 3831)
@@ -1,3 +1,3 @@
-﻿﻿/*
+﻿﻿﻿/*
 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -311,6 +311,7 @@
 			// structure.
 			var div = document.createElement( 'div' );
-			div.innerHTML = data;
-			data = div.innerHTML;
+			// Add fake character to workaround IE comments bug. (#3801)
+			div.innerHTML = 'a' + data;
+			data = div.innerHTML.substr( 1 );
 
 			if ( CKEDITOR.env.ie )
Index: CKEditor/trunk/_source/tests/plugins/htmldataprocessor/htmldataprocessor.html
===================================================================
--- CKEditor/trunk/_source/tests/plugins/htmldataprocessor/htmldataprocessor.html	(revision 3830)
+++ CKEditor/trunk/_source/tests/plugins/htmldataprocessor/htmldataprocessor.html	(revision 3831)
@@ -284,4 +284,21 @@
 		},
 
+		test_innerHtmlComments_ticket_3801 : function()
+		{
+			var editor = CKEDITOR.instances.editor1,
+				dataProcessor = editor.dataProcessor;
+
+			dataProcessor.writer = new CKEDITOR.htmlParser.basicWriter();
+
+			for ( var i = 1; i <= 7; i++ )
+			{
+				var html = getTextAreaValue( '_TEXTAREA_3801_' + i );
+				var protectedHtml = dataProcessor.toHtml( html );
+
+				assert.areSame( getTextAreaValue( '_TEXTAREA_3801_' + i ),
+					dataProcessor.toDataFormat( protectedHtml ) );
+			}
+		},
+		
 		name : document.title
 	};
