Index: /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js	(revision 5456)
+++ /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js	(revision 5457)
@@ -271,4 +271,5 @@
 			var frameLabel = editor.lang.editorTitle.replace( '%1', editor.name );
 
+			var contentDomReadyHandler;
 			editor.on( 'editingBlockReady', function()
 				{
@@ -320,5 +321,6 @@
 								var doc = iframe.getFrameDocument().$;
 
-								doc.open();
+								// Don't leave any history log in IE. (#5657)
+								doc.open( "text/html","replace" );
 								doc.write( data );
 								doc.close();
@@ -330,5 +332,5 @@
 					// The script that launches the bootstrap logic on 'domReady', so the document
 					// is fully editable even before the editing iframe is fully loaded (#4455).
-					var contentDomReadyHandler = CKEDITOR.tools.addFunction( contentDomReady );
+					contentDomReadyHandler = CKEDITOR.tools.addFunction( contentDomReady );
 					var activationScript =
 						'<script id="cke_actscrpt" type="text/javascript" cke_temp="1">' +
@@ -352,6 +354,4 @@
 						var script = domDocument.getElementById( "cke_actscrpt" );
 						script.parentNode.removeChild( script );
-
-						CKEDITOR.tools.removeFunction( contentDomReadyHandler );
 
 						body.spellcheck = !editor.config.disableNativeSpellChecker;
@@ -782,4 +782,5 @@
 				editor.on( 'destroy', function()
 				{
+					CKEDITOR.tools.removeFunction( contentDomReadyHandler );
 					ieFocusGrabber.clearCustomData();
 				} );
