Index: plugins/htmldataprocessor/plugin.js
===================================================================
--- plugins/htmldataprocessor/plugin.js	(revision 3794)
+++ plugins/htmldataprocessor/plugin.js	(working copy)
@@ -249,6 +249,15 @@
 		{
 			data = data.replace( regexes[i], function( match )
 				{
+					match = match.replace( /<\!--{(.*?)}(.*?)-->/g,		// Restore the inner text (#3869).
+						function( a, marker, comment )
+						{
+							return ( "{" + marker + "}" == protectedSourceMarker ) ? 
+									decodeURIComponent( comment )
+								:
+									comment;
+						}
+					);
 					return '<!--' + protectedSourceMarker + encodeURIComponent( match ).replace( /--/g, '%2D%2D' ) + '-->';
 				});
 		}
Index: tests/plugins/htmldataprocessor/htmldataprocessor.html
===================================================================
--- tests/plugins/htmldataprocessor/htmldataprocessor.html	(revision 3794)
+++ tests/plugins/htmldataprocessor/htmldataprocessor.html	(working copy)
@@ -270,7 +270,34 @@
 				dataProcessor.toDataFormat( protectedHtml ) );
 		},
 
+		test_ticket_3869_1 : function()
+		{
+			var editor = CKEDITOR.instances.editor1,
+				dataProcessor = editor.dataProcessor;
 
+			dataProcessor.writer = new CKEDITOR.htmlParser.basicWriter();
+			var html = getTextAreaValue( '_TEXTAREA_3869_1' );
+			var protectedHtml = dataProcessor.toHtml( html );
+
+			assert.areSame( html , dataProcessor.toDataFormat( protectedHtml ) );
+		},
+
+		test_ticket_3869_2 : function()
+		{
+			var editor = CKEDITOR.instances.editor1,
+				dataProcessor = editor.dataProcessor,
+				config = editor.config;
+
+			config.protectedSource.push( /<\?[\s\S]*?\?>/g );   // PHP Code
+			config.protectedSource.push( /<%[\s\S]*?%>/g );   // ASP Code
+			config.protectedSource.push( /(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi );   // ASP.Net Code
+			dataProcessor.writer = new CKEDITOR.htmlParser.basicWriter();
+			var html = getTextAreaValue( '_TEXTAREA_3869_2' );
+			var protectedHtml = dataProcessor.toHtml( html );
+
+			assert.areSame( html , dataProcessor.toDataFormat( protectedHtml ) );
+		},
+
 		name : document.title
 	};
 })() );
@@ -290,5 +317,15 @@
 	<textarea id="_TEXTAREA_3591"><object><param /><param /><embed></embed></object></textarea>
 	<textarea id="_TEXTAREA_3591_protected"><cke:object><cke:param></cke:param><cke:param></cke:param><cke:embed></cke:embed></cke:object></textarea>
 	<textarea id="_TEXTAREA_3591_2"><object classid="clsid"><param name="movie" value="movie.swf" /><embed src="movie.swf" type="application/x-shockwave-flash"></embed></object></textarea>
+	<textarea id="_TEXTAREA_3869_1">#3869<script language="Javascript" type="text/javascript">
+	<!--
+		alert('-->')
+	//-->
+	</script></textarea>
+	<textarea id="_TEXTAREA_3869_2">#3869<?
+		echo '<script type="text/javascript">';
+		echo '<!--alert("-->");//-->';
+		echo '</script>';
+	?><!--<%Response.Write(now())%>//--><!-- <script language="Javascript" type="text/javascript"></script> --></textarea>
 </body>
 </html>
