Index: typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js	(révision 5926)
+++ typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js	(copie de travail)
@@ -1983,8 +1983,8 @@
 		case "Paste"	:
 			try {
 				this._doc.execCommand(cmdID, false, null);
-					// In FF3, the paste operation will indeed trigger the paste event
-				if (HTMLArea.is_gecko && cmdID == "Paste" && this._toolbarObjects.CleanWord && navigator.productSub < 2008020514) {
+					// In FF3, the paste operation will trigger the paste event
+				if (cmdID == "Paste" && this._toolbarObjects.CleanWord && (HTMLArea.is_opera || (HTMLArea.is_gecko && navigator.productSub < 20080514))) {
 					this._toolbarObjects.CleanWord.cmd(this, "CleanWord");
 				}
 			} catch (e) {
@@ -2055,7 +2055,7 @@
 						return false;
 						break;
 					case "Paste"	:
-						if (HTMLArea.is_opera || (HTMLArea.is_gecko && navigator.productSub < 2008020514)) {
+						if (HTMLArea.is_opera || (HTMLArea.is_gecko && navigator.productSub < 20080514)) {
 							if (editor._toolbarObjects.CleanWord) {
 								var cleanLaterFunctRef = editor.plugins.DefaultClean ? editor.plugins.DefaultClean.instance.cleanLaterFunctRef : (editor.plugins.TYPO3HtmlParser ? editor.plugins.TYPO3HtmlParser.instance.cleanLaterFunctRef : null);
 								if (cleanLaterFunctRef) {
@@ -2629,11 +2629,15 @@
 	return null;
 };
 
-/** Use XML HTTPRequest to post some data back to the server and do something
- * with the response (asyncronously!), this is used by such things as the spellchecker update personal dict function
+/*
+ * Use XML HTTPRequest to post some data back to the server and do something
+ * with the response (asyncronously or syncronously); this is used by such things as the spellchecker update personal dict function
  */
-HTMLArea._postback = function(url, data, handler, addParams, charset) {
+HTMLArea._postback = function(url, data, handler, addParams, charset, asynchronous) {
 	if (typeof(charset) == "undefined") var charset = "utf-8";
+	if (typeof(asynchronous) == "undefined") {
+		var asynchronous = true;
+	}
 	var req = null;
 	if (window.XMLHttpRequest) req = new XMLHttpRequest();
 		else if (window.ActiveXObject) {
@@ -2660,24 +2664,38 @@
 		}
 
 		function callBack() {
-			if(req.readyState == 4) {
+			if (req.readyState == 4) {
 				if (req.status == 200) {
-					if (typeof(handler) == 'function') handler(req.responseText, req);
+					if (typeof(handler) == "function") handler(req.responseText, req);
 					HTMLArea._appendToLog("[HTMLArea::_postback]: Server response: " + req.responseText);
 				} else {
 					HTMLArea._appendToLog("ERROR [HTMLArea::_postback]: Unable to post " + postUrl + " . Server reported " + req.statusText);
 				}
 			}
 		}
-		req.onreadystatechange = callBack;
+		if (asynchronous) {
+			req.onreadystatechange = callBack;
+		}
 		function sendRequest() {
 			HTMLArea._appendToLog("[HTMLArea::_postback]: Request: " + content);
 			req.send(content);
 		}
 
-		req.open('POST', postUrl, true);
+		req.open('POST', postUrl, asynchronous);
 		req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
-		window.setTimeout(sendRequest, 500);
+		if (!asynchronous) {
+			sendRequest();
+			if (req.status == 200) {
+				if (typeof(handler) == "function") {
+					handler(req.responseText, req);
+				}
+				HTMLArea._appendToLog("[HTMLArea::_postback]: Server response: " + req.responseText);
+			} else {
+				HTMLArea._appendToLog("ERROR [HTMLArea::_postback]: Unable to post " + postUrl + " . Server reported " + req.statusText);
+			}
+		} else {
+			window.setTimeout(sendRequest, 500);
+		}
 	}
 };
 
@@ -3270,11 +3288,15 @@
 	 * @param	string		url: url to post data to
 	 * @param	object		data: data to be posted
 	 * @param	function	handler: function that will handle the response returned by the server
+	 * @param	boolean		asynchronous: flag indicating if the request should processed asynchronously or not
 	 *
 	 * @return	boolean		true on success
 	 */
-	 postData : function (url, data, handler) {
-		 HTMLArea._postback(url, data, handler, this.editorConfiguration.RTEtsConfigParams, (this.editorConfiguration.typo3ContentCharset ? this.editorConfiguration.typo3ContentCharset : "utf-8"));
+	 postData : function (url, data, handler, asynchronous) {
+	 	 if (typeof(asynchronous) == "undefined") {
+	 	 	 var asynchronous = true;
+	 	 }
+		 HTMLArea._postback(url, data, handler, this.editorConfiguration.RTEtsConfigParams, (this.editorConfiguration.typo3ContentCharset ? this.editorConfiguration.typo3ContentCharset : "utf-8"), asynchronous);
 	 },
 
 	/**
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3HtmlParser/typo3html-parser.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3HtmlParser/typo3html-parser.js	(révision 5926)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3HtmlParser/typo3html-parser.js	(copie de travail)
@@ -1,7 +1,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 2005-2008 Stanislas Rolland <typo3(arobas)sjbr.ca>
+*  (c) 2005-2009 Stanislas Rolland <typo3(arobas)sjbr.ca>
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -99,12 +99,14 @@
 			editorNo : this.editorNumber,
 			content	 : editor._doc.body.innerHTML
 		};
+			// Invoke server-based synchronous pasted content cleaning
 		this.postData(	this.parseHtmlModulePath,
 				content,
 				function(response) {
 					editor.setHTML(response);
 					editor.selectRange(editor.moveToBookmark(bookmark));
-				}
+				},
+				false
 		);
 	}
 });
