Index: /CKEditor/branches/versions/3.2.x/CHANGES.html
===================================================================
--- /CKEditor/branches/versions/3.2.x/CHANGES.html	(revision 5146)
+++ /CKEditor/branches/versions/3.2.x/CHANGES.html	(revision 5147)
@@ -109,5 +109,7 @@
 		<li><a href="http://dev.fckeditor.net/ticket/4988">#4988</a> : It wasn't possible to use forcePasteAsPlainText with Safari on Mac.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/5095">#5095</a> : Safari on Mac deleted current selection when Edit menu was clicked.</li>
-		<li><a href="http://dev.fckeditor.net/ticket/5144">#5144</a> : Chrome could leave &lt;div id="cke_pastebin"&gt; elements after pasting.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/5140">#5140</a> : In High Contrast mode, arrows will now be displayed for menus with submenus.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/5163">#5163</a> : The undo system was not working on some specific cases.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/5162">#5162</a> : The ajax sample was throwing errors when loading data.</li>
 		<li>Updated the following language files:<ul>
 			<li><a href="http://dev.fckeditor.net/ticket/5006">#5006</a> : Dutch;</li>
Index: /CKEditor/branches/versions/3.2.x/_samples/ajax.html
===================================================================
--- /CKEditor/branches/versions/3.2.x/_samples/ajax.html	(revision 5146)
+++ /CKEditor/branches/versions/3.2.x/_samples/ajax.html	(revision 5147)
@@ -29,15 +29,17 @@
 	// Create a new editor inside the <div id="editor">
 	editor = CKEDITOR.appendTo( 'editor' );
-	editor.setData( html );
+	editor.setData( html, null, true );
 
 	// This sample may break here if the ckeditor_basic.js is used. In such case, the following code should be used instead:
 	/*
 	if ( editor.setData )
-	editor.setData( html );
+		editor.setData( html, null, true );
 	else
-	CKEDITOR.on( 'loaded', function()
 	{
-	editor.setData( html );
-	});
+		CKEDITOR.on( 'loaded', function()
+			{
+				editor.setData( html, null, true );
+			});
+	}
 	*/
 }
Index: /CKEditor/branches/versions/3.2.x/_source/core/dom/node.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/core/dom/node.js	(revision 5146)
+++ /CKEditor/branches/versions/3.2.x/_source/core/dom/node.js	(revision 5147)
@@ -206,25 +206,28 @@
 				var currentIndex = -1;
 
-				for ( var i = 0 ; i < parentNode.childNodes.length ; i++ )
-				{
-					var candidate = parentNode.childNodes[i];
-
-					if ( normalized &&
-							candidate.nodeType == 3 &&
-							candidate.previousSibling &&
-							candidate.previousSibling.nodeType == 3 )
+				if ( parentNode )
+				{
+					for ( var i = 0 ; i < parentNode.childNodes.length ; i++ )
 					{
-						continue;
+						var candidate = parentNode.childNodes[i];
+
+						if ( normalized &&
+								candidate.nodeType == 3 &&
+								candidate.previousSibling &&
+								candidate.previousSibling.nodeType == 3 )
+						{
+							continue;
+						}
+
+						currentIndex++;
+
+						if ( candidate == node )
+							break;
 					}
 
-					currentIndex++;
-
-					if ( candidate == node )
-						break;
+					address.unshift( currentIndex );
 				}
 
-				address.unshift( currentIndex );
-
-				node = node.parentNode;
+				node = parentNode;
 			}
 
Index: /CKEditor/branches/versions/3.2.x/_source/core/editor.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/core/editor.js	(revision 5146)
+++ /CKEditor/branches/versions/3.2.x/_source/core/editor.js	(revision 5147)
@@ -578,18 +578,21 @@
 
 		/**
-		 * Sets the editor data. The data must be provided in raw format (HTML).
-		 * <b>Note:</b> This's an asynchronous method, the {@param callback}
-		 * function should be relied on if you want to interact with the editor
-		 * after data is fully loaded.
-		 *
-		 * @param {String} data HTML code to replace the curent content in the editor.
-		 * @param {Function} callback Function to be called after the setData is completed.
-		 * @param {Boolean} noUndo Specify false to avoid editor from creating undo snapshot for this load.    
-		 * @example
-		 * CKEDITOR.instances.editor1.<b>setData( '&lt;p&gt;This is the editor data.&lt;/p&gt;' )</b>;
-		 * CKEDITOR.instances.editor1.setData( '&lt;p&gt;Some other editor data.&lt;/p&gt;', function()
-		 * {
-		 * 		CKEDITOR.instances.editor1.checkDirty(); 	// true
-		 * } );
+		 * Sets the editor data. The data must be provided in raw format (HTML).<br />
+		 * <br />
+		 * Note that this menthod is asynchronous. The "callback" parameter must
+		 * be used if interaction with the editor is needed after setting the data.
+		 * @param {String} data HTML code to replace the curent content in the
+		 *		editor.
+		 * @param {Function} callback Function to be called after the setData
+		 *		is completed.
+		 * @param {Boolean} noUndo Indicates that the function call must not
+		 *		create and undo snapshot.
+		 * @example
+		 * CKEDITOR.instances.editor1.<b>setData</b>( '&lt;p&gt;This is the editor data.&lt;/p&gt;' );
+		 * @example
+		 * CKEDITOR.instances.editor1.<b>setData</b>( '&lt;p&gt;Some other editor data.&lt;/p&gt;', function()
+		 *     {
+		 *         this.checkDirty();    // true
+		 *     });
 		 */
 		setData : function( data , callback, noUndo )
@@ -603,4 +606,5 @@
 					noUndo !== false && this.fire( 'saveSnapshot' );
 				});
+
 			// Fire "setData" so data manipulation may happen.
 			var eventData = { dataValue : data };
Index: /CKEditor/branches/versions/3.2.x/_source/core/event.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/core/event.js	(revision 5146)
+++ /CKEditor/branches/versions/3.2.x/_source/core/event.js	(revision 5147)
@@ -78,5 +78,6 @@
 			 * @param {String} eventName The event name to which listen.
 			 * @param {Function} listenerFunction The function listening to the
-			 *		event.
+			 *		event. A single {@link CKEDITOR.eventInfo} object instanced
+			 *		is passed to this function containing all the event data.
 			 * @param {Object} [scopeObj] The object used to scope the listener
 			 *		call (the this object. If omitted, the current object is used.
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/image/dialogs/image.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/image/dialogs/image.js	(revision 5146)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/image/dialogs/image.js	(revision 5147)
@@ -1106,5 +1106,5 @@
 							type : 'button',
 							id : 'browse',
-							filebrowser : 
+							filebrowser :
 							{
 								action : 'Browse',
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/justify/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/justify/plugin.js	(revision 5146)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/justify/plugin.js	(revision 5147)
@@ -84,5 +84,5 @@
 				iterator = ranges[ i ].createIterator();
 				iterator.enlargeBr = enterMode != CKEDITOR.ENTER_BR;
-				
+
 				while ( ( block = iterator.getNextParagraph() ) )
 				{
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/link/dialogs/link.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/link/dialogs/link.js	(revision 5146)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/link/dialogs/link.js	(revision 5147)
@@ -20,5 +20,5 @@
 		popupFeatures.hide();
 		targetName.setValue( '' );
-		
+
 		switch ( value )
  		{
@@ -37,5 +37,5 @@
 				break;
  		}
-		
+
 	};
 
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/menu/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/menu/plugin.js	(revision 5146)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/menu/plugin.js	(revision 5147)
@@ -360,5 +360,11 @@
 			{
 				output.push(
-							'<span class="cke_menuarrow"></span>' );
+							'<span class="cke_menuarrow">',
+								'<span>&#',
+									( this.editor.lang.dir == 'rtl' ?
+										'9668' :	// BLACK LEFT-POINTING POINTER
+										'9658' ),	// BLACK RIGHT-POINTING POINTER
+								';</span>',
+							'</span>' );
 			}
 
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/selection/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/selection/plugin.js	(revision 5146)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/selection/plugin.js	(revision 5147)
@@ -144,5 +144,5 @@
 								if ( CKEDITOR.env.ie && CKEDITOR.env.version < 8 )
 								{
-									// IE stack overflows when we're doing so inside table. (#5114)   
+									// IE stack overflows when we're doing so inside table. (#5114)
 									var parent =
 										savedRange
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/undo/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/undo/plugin.js	(revision 5146)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/undo/plugin.js	(revision 5147)
@@ -121,12 +121,12 @@
 	function Image( editor )
 	{
-		var selection = editor.getSelection();
-
-		this.contents	= editor.getSnapshot();
+		var contents	= editor.getSnapshot(),
+			selection	= contents && editor.getSelection();
+
+		// In IE, we need to remove the expando attributes.
+		CKEDITOR.env.ie && contents && ( contents = contents.replace( /\s+_cke_expando=".*?"/g, '' ) );
+
+		this.contents	= contents;
 		this.bookmarks	= selection && selection.createBookmarks2( true );
-
-		// In IE, we need to remove the expando attributes.
-		if ( CKEDITOR.env.ie )
-			this.contents = this.contents.replace( /\s+_cke_expando=".*?"/g, '' );
 	}
 
@@ -352,4 +352,8 @@
 				image = new Image( this.editor );
 
+			// Do nothing if it was not possible to retrieve an image.
+			if ( image.contents === false )
+				return false;
+
 			// Check if this is a duplicate. In such case, do nothing.
 			if ( this.currentImage && image.equals( this.currentImage, onContentOnly ) )
@@ -393,5 +397,5 @@
 			// Update current image with the actual editor
 			// content, since actualy content may differ from
-			// the original snapshot due to dom change. (#4622) 
+			// the original snapshot due to dom change. (#4622)
 			this.snapshots.splice( this.index, 1, ( this.currentImage =  new Image( this.editor ) ) );
 
Index: /CKEditor/branches/versions/3.2.x/_source/skins/kama/menu.css
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/skins/kama/menu.css	(revision 5146)
+++ /CKEditor/branches/versions/3.2.x/_source/skins/kama/menu.css	(revision 5147)
@@ -181,4 +181,20 @@
 }
 
+.cke_skin_kama .cke_menuarrow span
+{
+	display: none;
+}
+
+.cke_hc .cke_skin_kama .cke_menuarrow
+{
+	width: auto;
+	margin-top: 0;
+}
+
+.cke_hc .cke_skin_kama .cke_menuarrow span
+{
+	display: inline;
+}
+
 /* #3766 In the context menu, long labels with second level menu get wrapped */
 .cke_browser_ie.cke_ltr .cke_skin_kama .cke_menuarrow
Index: /CKEditor/branches/versions/3.2.x/_source/skins/office2003/menu.css
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/skins/office2003/menu.css	(revision 5146)
+++ /CKEditor/branches/versions/3.2.x/_source/skins/office2003/menu.css	(revision 5147)
@@ -177,4 +177,20 @@
 }
 
+.cke_skin_office2003 .cke_menuarrow span
+{
+	display: none;
+}
+
+.cke_hc .cke_skin_office2003 .cke_menuarrow
+{
+	width: auto;
+	margin-top: 0;
+}
+
+.cke_hc .cke_skin_office2003 .cke_menuarrow span
+{
+	display: inline;
+}
+
 /* #3766 In the context menu, long labels with second level menu get wrapped */
 .cke_browser_ie.cke_ltr .cke_skin_office2003 .cke_menuarrow
Index: /CKEditor/branches/versions/3.2.x/_source/skins/v2/menu.css
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/skins/v2/menu.css	(revision 5146)
+++ /CKEditor/branches/versions/3.2.x/_source/skins/v2/menu.css	(revision 5147)
@@ -180,4 +180,20 @@
 }
 
+.cke_skin_v2 .cke_menuarrow span
+{
+	display: none;
+}
+
+.cke_hc .cke_skin_v2 .cke_menuarrow
+{
+	width: auto;
+	margin-top: 0;
+}
+
+.cke_hc .cke_skin_v2 .cke_menuarrow span
+{
+	display: inline;
+}
+
 /* #3766 In the context menu, long labels with second level menu get wrapped */
 .cke_browser_ie.cke_ltr .cke_skin_v2 .cke_menuarrow
