Index: /CKEditor/tests/tt/4708/1.html
===================================================================
--- /CKEditor/tests/tt/4708/1.html	(revision 4553)
+++ /CKEditor/tests/tt/4708/1.html	(revision 4553)
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+	"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+	<title>Ticket Test: #4340</title>
+	<meta name="tags" content="editor,unit,all">
+	<script type="text/javascript" src="../../cktester/cell.js"></script>
+	<script>
+( function()
+{
+	var ts, tc, test = CKEDITOR.test, assert = CKEDITOR.test.assert;
+
+	YAHOO.tool.TestRunner.add( ts = new CKEDITOR.test.suites.editorTestSuite(
+		{
+				editorName : 'editor1',
+				startupData : '<p>test&nbsp;escape</p>',
+				config: { htmlEncodeOutput : true },
+				name :document.title
+		} ) );
+
+	ts.add( tc = new YAHOO.tool.TestCase(
+		{
+			setUp : function ()
+			{
+				// Force result data unformatted.
+				ts.editor.dataProcessor.writer._.rules = {};
+				ts.editor.focus();
+			},
+
+			/**
+			 * Test escape html when update editor's input element.
+			 */
+			test_updateElement_encodeHtml : function()
+			{
+				var editor = ts.editor;
+				editor.updateElement();
+				assert.areEqual( '&lt;p&gt;test&amp;nbsp;escape&lt;/p&gt;', editor.element.getValue() );
+			}
+		} ) );
+} )();
+	</script>
+</head>
+<body>
+<textarea id='editor1'></textarea>
+</body>
+</html>
